add jshint configuration and two fixes