Make score relative to edit distance.
Handle WebSocket close event.