jshint implementation and javascript optimization