How to ground electronics correctly
Keep this in mind while changing grounds:



The first thing is, you need to have low resistance for a ground. Why? because low resistance prevents a thing called common mode noise. 

If you have two devices, daisy chained with a small wire between them (like an Rpi) and the resistance is say 1Ω (which would be bad) and the switching current (like when all the transistors switch at the same time) is 50mA then that would be V=I*R or 50mA*1Ω=0.05V which would create voltage noise. 

Conversely if the ground were 10mΩ with 50mA current switching, that would be 0.5mV noise. This effect also doesn't account for inductance, but making better grounds also decreases inductance. 

This is also why we make a nice big ground plane on PCB's, in the old days, a ground trace was run from chip to chip because 2 layers was the usual manufacture, and there were many problems with common mode noise and grounds. 

Also avoid ground loops 


  Can all of the grounds be on the same rail as the 9V minus terminal?


All of the grounds can be on the same terminal, its called a star ground if you run all of the wires back to one terminal. 

Breadboards are bad for grounding because of contact resistance and not a wide ground, so you should end up with a better design.