[PATCH] Diff overhaul, adding half of copy detection.