Complete redesign of websocket handling to start integration with xhr-polling
new websocket implementation working (i hope)