Base tree class