Cleaning code for JSHINT