TreeStage and Tree classes are finished.