changed websocket library and refactored webhub