Refactor as a pipeline.