refactorings in splitting and merging