Refactor mongodb config files