Move build_flow to its own m file.