game states & refactoring