minor serialization reorganization, implementing TEI export