jshint itnegration and minor fixes