cleanup rpc code

update example script

update tests to make use of newer rpc code

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
v1.2