Removes unnecessary deletions