Build the tree on initialisation.