#45 #55 generalize Pipe to PipeClass and add examples