Updated export functionality