More work on websocket framework. Almost done.