Initial code for export.py