Adjusted removeEdge for uniformity