Fixing document structure.