fix error handling + a few simple commands
tests and fixed signatures for many rpc methods