First question... How do I improve the Twig code. It really should be recursive rather than the 4 loops that I have.
I tried using Macros from here:
https://stackoverflow.com/questions/8326482/how-to-render-a-tree-in-twig but it couldn't make it work.