Flattening code flows to make adding feature easier (untested)