Small code cleanup and documentation fixes.