implementing some more rpc commands.
attempting to standardize errors and conform to json rpc specs.