Websocket functions moved to seperate namespace.