Further optimisations and adding PWM to Sensor Config