Implement basic RPC

  - issue #32