Changes to delete functionality