turning modules into objects: entities.js