Checking in edge merging before reverting to node merging with addition of removing connectivity-2 nodes working