Updated TouchSwitch code