Switched message system to websocket and made it events based