cleans code and fixes jshint