Sorting nodes.