Stubbs for KDB writing
Refactored format into two header to be used for xml and legacy files