this strange construct is actually a recursive template that I use to render the branch tree.