Further additions to the pipeline.py script