Trying to figure this all out (aftermarket stereo system)

I would take it all out, & verify how it's all hooked up. Reinstall with all pieces secured to a removable base with quick connect type wiring & wired where it is pleasing to the eye. A lot of professional installers are probably having nightmares over those pictures. Just be sure that all of the wiring is at least adequate to hand the amperage & that everything is grounded properly. Do not cheap out on the wiring, you will regret it.