Extracting Mongoose intro an internal module.