Added more functionality onto the ball's movement.