flow: redo module hierarchy
flow: refactoring to separate generic flows from IO