Cleanup end of the pipeline