Improvements to fix jshint warnings.