Mongo Session refactoring