Added basic infrastructure for connection management.