Changed all instances of ArrayList to SortedList