Made changes to pipeline to allow more general parameter passing