First version of pipe engine factory.  Seems to work so far.