Moved some code to GameStates source file