revamp of GameState code