made it json-rpc 2.0 compliant: updated to support named params and objects in params, added error codes