Added primitive game state mechanism. Needs major refactoring.