Updated template - added myprint and generic parr and pmat.