add jshint support and fix warnings