refactor YAML headers as in core