cleaned code to match jshintrc