The following classes and functions represent the primitives to construct and work with the tree structure.