Diff thingy refactoring