Migrated connection code from test to DPConnectManager