WIP: Ws client code

Why this change?  It doesn't need to be global.