Added PWM functionality.