Refactor tasks.