Update document structure