improved Tree class destructor.