Cleanups to RPC code.

This is extracted from a significantly longer RPC change that I put down a couple of weeks ago.

It deletes some unused code, uses Issue and Book a little more, and fixes some long lines and indentation.

Feel free to use this or ignore it!
The generator stuff is significantly different from the old code.  Since I don't know a generator from a germanium I'll assume you've done the right stuff or that Vinnie will catch issues.