Improve websocket lib