Creating mainMenu state and OneSwitchManager class