New function sortByDegree returns a putative removal order. Fixes Issue #4.