Numerous changes to support new Ledger package.