more cleanup on pwm and test code for servo