Updated to use new output flow.