Fixing syntax errors and typos with http://www.jshint.com/.