Refactoring BasicDocumentParser.initialize