WIP on pwm update. Fixed issue with pin connection being triggered multiple times.