Refactoring to keep pgdiff.go small and grokable