Refactored SetupPipe and its tests. (Issue #55)