Fix connect task after upgrade to 3.0.

Install missing modules. Replace static and directory methods with their modules.