Small refactoring for module.exports