Refactoring tasks distribution