Implement merge and remove merge_to