Add a sample RPC application, and fix some bugs / add some missing features needed by said app.