Added actual merging based on the global labels.

Merging using the global labels seems to work. But not tested well.