First attempt at implmenting some collision detection. Not perfect yet