Standardize the pipeline ans separate it from the command line interface