ADDED: Merge values of pairs with the same key.