Documentation work and minor code cleanup.