Refined the PWM mode a bit.