SortedList refactor