test_ledgerbil up to date with other refactoring and new unit tests