cleanup and initial export