Cleanup and resolution of many jshint errors, still a few left to figure out.