Clean up of sockets.js.