First impl of channel communication

First attempt to abstract the websocket library from the user
application using channels