Better exporting, groundwork for importing