Turned db-style API into Mongoose module and reformatted models to adhere to the format for the new module.