Minor tweaks and outputing pdfs where needed.