Fixed old config reference in connector.
Cleaned up connection handling.