Added collision detection to movement