Refactors code based on jshint comments.