Merge pull request #1642 from arrbee/diff-function-context Diff code reorg plus function context in diff headers