Refactoring diff tools a bit.