test fixes and initial MetaFlow