simplify structures
add export to XML + add missing attributes