use simpler init syntax for ledger struct
clear external pointers after free