Added delete function to the delete-icon in the list