Format code, and fix jshint warnings.
Merged with ericlathrop-formatting
Merge branch 'ericlathrop-formatting'