Getting closer to the new architecture. Moved the PDF writing functionality into its own class. Added a stream object and an integer object.