implement batch export.
move project code to separate files.