Modularsing the jsonrpc server for ssl and tcp support. Preparing  for hole punching.