Made a number of improvements to the PairSums class.