furhter gamestate refactoring.