refactor game code
Move all functions and event listeners into objects
Merge pull request #59 from ffmegaman/refactor

Refactor