Added very basic WebSocket support to json server

Initialise variables in initialise section (one line up)