Use typed pipes.

Also added first-cut item-item-CF calculator (not tested).