Updated jshint to catch implicit globals. Fixed offending code.