Added pwm module and more generics