Corrected the if statements to work with and not against each other. Inserted a function to make sure the ball never leaves the screen.