Revert "refactor code, move pdf stuff to separate files"

This reverts commit 4adc4d117beb061ea04cc20541540faa4f446cfc.