Refactor: Making GlobalState a Singleton