Setup the StateManager system.