somehow working websocket server
and a few small fixes