simplified controlPowerSwitch.py

restructured code to allow for a faster and more bare-bones approach