Toggle the main switch