Got rid of an unncessary sort in savePairs.