Refactored the tasks.