Refactored emission of structure headings