Initial version of the export functionality