Removed old method for constructing the sorted list.