Adding export.py and test_export.py