some jshint corrections