Building an object-oriented environment for document processing