Refactoring in ExportController.