added websocket server, changed initialisation procedure