Limited the player to stay within the screen in the horizontal
directions.
And some code cleanup