FlowFunction init and close interface
Pushed it to the point it thinks it works...
Found the first issue point
BuildIndex mostly working