Cleaning up socket.js to remove junk code