Sorted list - sort() not working, infinite loop. Headache.