Fix saving deletions to storage, add tests