Added function to delete lists from the tree and program