add jshint checking, fix some jshint errs