Added restrictions to the edge of the screen for the movement