Collision detection modified (still messy)