Connection handshake now callback based, and lots of cosmetics