GraphPair refactoring and full impl of initialDiff