Extract diffing code to support.