Added ModeManager.ts