Added extra socket to client and server.

Also, added closing to Mongo.