proper jshint linting and fixing the errors