Merges branches