Put mongo-related code in a separated class