Switched ModeManager to StateManager