adding PDF conversion steps
some more cleanup
some more cleanup after PDF generation