Reworked sorter and tests to go with changes to remove the previous field for CSNodes.