Cleaned up code and added stopping on collide

Reduced a whole bunch of redundant code and made it so when two objects
collide they stop until the player moves around.