Allow ledgers to be loaded from the command line.

This is a combination of changes from David and Nicholas, with some tiny cleanups by me.

1. PLEASE give this extra attention as I'm not completely up-to-date with these areas of the code.
2. Why is this marked as Author: Vinnie?  I tried to change it, failed.
3. Unitttests and npm tests pass (of course).