Refactor mongodb roles