Moved functionality for sorting BoundingPairs into seperate class.