Procedural "tree" help

so there are multiple issues with my script, and it is very far from what I ultimately want to do, but for now,
Base geometry1.3dm (129.8 KB)
I have a few issues with my script that I can’t seem to solve with the NURBS curve
Tree (52.5 KB)

I don’t quite understand what you gonna do, anyway if you would be more careful dealing with datatree, then the result might be something like this?

Tree (31.7 KB)

Extremely helpful, I originally had the output go to the multi-pipe command how would I go about that using this new script?