Tidying up pdfwrite.ml