Added private method for init in states.
Renamed onSwitch to destroy in states.