REF #4121  several jshint fixes