Moved connect task definition to proper location