Updated the delete functions