WebSocketClient: (wip) rework code