Banking is inherently fragile because it involves transforming liquid liabilities into illiquid assets.
The best way to improve a program is to rewrite it.