Cleanup and document.
Fixes.