Improved export functionality