Tidy up code using jshint tool