rearrange Pipeline to have more functionality in PipelineBase