Made some websocket improvements.