Added support for dynamically adding and removing connections.