Extract merging logic to it's own function

This makes it testable.
extract singleGet functional literal from multiGet

This makes the logic in multiGet clearer.