Properly sort master list.