Added get_tree method.