Creating a GameState class to clean up duplicate code.
Cleanup: Add base attribute to GameState to avoid using the global base.