Hi yeah - I was not 100% sure of your final intent (some assumptions were made) .
The changes I made were mostly academic & for showing you alternative methods.
Mainly I wanted to show you how the graph can be populated.
From what I've seen from you I am sure you can integrate what I did with your work & get it going pretty quickly & easily.
Key points I tried to make were...
- using topics
- use of flow context
- use of function nodes with multiple outputs
- how to populate graph
Let us know if you get stuck.