Refactored models into node module exports