Made turnOn and turnOff a single turn function and tuned some constants.