WIP: Ws client code

Why are we in an error state here?  Can you add comments above this?