Connect task refactoring