Refactoring the task export process.