Removed custom SortedList class and substituted it for std::set