Some refactoring to split the game from the engine