Moved from better-assert to expect and fixed toLedger bugs