Updated for new Mongoose module.