Adapting Document Processor

Various alterations to the document processor.