clean the code after jshint complaints