make dataflows work. No backend yet. Other refactorings