changes xobject, xtype structure to a lean one