class created for diffs, some assertions added, clean the hashtables on delete