Further implementation cleanup.
Cleanup and further documentation.