Refactor MongoDB#retrieve