Merge in some documentation fixes and code cleanup from develop.