Misc cleanups and improvements
Merge branch 'master' into gh-pages