Smart switch toggle
Simplified main.lua, using SmartSwitches