Added some connection code.