Refactoring the pong game and some other minor changes