Add pipes documentation

Also fix a few bugs in the process