Doc and code fixups
Merge branch 'master' into gh-pages