clean mongo.js to let only the useful JS function to create missing fields