Reorg and minor fixing of pipeHandler