Refactor Mongoose models.