First version of connection manager