Keep refactoring export.js and comply with jslint