Use stateManager namespace instead of static StateManager class

The static class declaration can provide multiple instances of the class
in multiple translation units. We don't want that. We only want one instance.