Implemented tree destructor