Refactor task