Preparation for Browserify conversion.  Refactoring from Webstorm CodeInspection.
Merge remote-tracking branch 'origin/master'