I've already implemented the sort. It occurs to me, though, that I have to make sure duplicates don't get on the list. I think I can fairly assume that the program won't create them; so I just need some form of error-checking just before it pushes the value into the array.
I may try implementing the whole ball of wax as a two-dimensional array, just to see if I can sort by the other ops. I think I can, but the stuff I've checked on it is ambiguous so far.
I feel better having gotten it to work...but it's a little hollow, considering that I don't know why it worked.
Oh well. I'll take what I can get for now, and research it when I'm getting paid to do web maintenance.