Refactoring for Jshint