Refine pipeline