Cleaned up PWM a bit, and added license.