Improve WS client helper