Laid the groundwork for doing sorting of the edges.