minor work on structure exporting ability, it might actually work now,
but needs testing