Refactoring and fixes in the mongo/redis clientele´