flow: more work on code generation preps plus stubs