Fixed bug where player could float

Fixed bug that occured when the player touched the top of the window
while jumping, in which they could essentially fly across the top of the
screen as long as they help down the jump button.

Also added several comments and fixed small issues here and there.