Cleaned up sockets.js.