minor code cleanup and doc updates