[misc] Clean-up code for JSHINT compliance