added guard for CustomEvent

returning websocket from initialization code
commenting websocket message format