refactored ExportPackages, improved comments