Fix a bug in merge()
Sorting of tupled keys works

There is still sort_by_key and a better interface to implement