Implemented setup/teardown for pipeline