Added move semantics for tree