refactored Export.scpt, and moved the functions to ExportLibrary.scpt