Refactored movement to have better collision detection.