polish and document wallettree.go