all tests pass. nxt: impmt all helpers in clj-pdf.template and code cleanup