changed treeposition,empty, delete (bug in deleting when deleting last
item) ,and isleaf