Work on the PDF refactor