Changes for more universal PWM usage