added PipelineSocket and tests; various fixes