Completely refactored the machinery for the game