Remove dead code from duty cycle
Add documentation