Fixed a bunch of stuff.
Fix conflict with Kevin's changes.
Merge branch 'master' into gh-pages