added JSON RPC support, improved HTTP transport