StateSingleton is a new class for keeping track of states while
applications are running.