move diffing stuff into another package