Move the build function into the tree namespace, for the tree class.