Complete rewrite - multiple connections supported