Refactor game code into own module