Structure refactoring + security feature + beginning of mongo configuration