Moved starting the WS server into a separate method