Partial interface rework. Introduce data flows as a concept and as a C type. Update some interfaces to use them.