refactor tasks and workflows