Documentation updates and code cleanup.