Fixing syntax issues caught by jshint