Changing in how pwm period, max allowable pwm are calcualted. Also provide getters.