General utilities for building flows.