Add Mese and Diamese pipes, and fix a few bugs