[Release:Algorithm Change] Update sorting algorithms to be consistent with new output format.