Code cleanup
Merge branch 'master' into gh-pages