Fix a bunch of jshint complaints in main.js