Clean up socket.js