Refactor remaining flows to use next_node_if