Started reimplementation of CONNECT, made some logging enhancements