Cleanup document.
Add motor current averaging code.