Update export to make it more useful for Panels which does not always export in a straightforward manner.