Bank of America may not be completely healed, but the worst of its issues are now behind it. Image credit: iStock/Thinkstock.

When historians look back on the financial crisis 50 years from now, one of the storylines will involve Bank of America's (BAC -1.07%) near failure. They'll also, I believe, identify 2015 as the year that the nation's second biggest bank by assets moved beyond its past mistakes.

To understand why 2015 was so important for Bank of America, it's important to appreciate the sources of the bank's troubles over the past seven years.

One reason is that it gave credit cards to people who, by the bank's own admission, shouldn't have had them in the first place. This cost Bank of America roughly $60 billion in excess losses, though it was largely addressed by the end of 2010, after which credit cards losses normalized.

Since then, Bank of America's problems have been principally legal and regulatory in nature. It's run into issues on the annual stress tests more years than any other too-big-to-fail bank, essentially failing it in three out of the last five years. This has impeded the bank's ability to raise its dividend, limited the amount of stock it can buy back, led to the ouster of key executives, and caused further reputational damage to an already-unpopular institution.

It's also had to absorb roughly $62 billion worth of legal costs, a substantial share of which relate to its 2008 acquisition of Countrywide Financial. The most burdensome costs stemmed from representation and warranties claims brought by institutional investors in Countrywide-originated mortgages. These claims are analogous to a manufacturer's warranty on an electronics product, giving a purchaser the right to return, say, a faulty DVD player for a refund.

Finally, there's Bank of America's "bad bank" -- its legacy assets and servicing division that's responsible for disposing of toxic and noncore assets related in one way or another to the financial crisis. At its peak in 2012, the unit employed 41,800 full-time employees, equating to more employees than at 68% of S&P 500 companies, and yielded an $11.4 billion pre-tax loss.

Taken together, Bank of America estimates that the financial crisis cost it $195 billion, exceeding the bank's capital base going into the crisis by more than 40%. This is why the $2.2 trillion bank would no longer be here but for $40 billion worth of taxpayer bailouts.

The good news today, in turn, is that most of these issues have been resolved. The credit card losses, as already noted, had been dealt with by 2010. And the bank reached two more milestones in 2015.

During the second quarter, a New York state court ruled that representation and warranties claims must be brought within six years after the allegedly faulty mortgage or mortgage-backed security was purchased. For all intents and purposes, this bars new crisis-related rep and warranty claims against Bank of America and has allowed it to drop its estimate of outstanding claims by $7.6 billion.

It was also able to reduce noninterest expenses from its LAS unit to less than $1 billion a quarter. That's still a lot of money, but it's a fraction of its former level, which at one point was three times higher.

Does all of this mean that Bank of America is once again on an even playing field with the likes of Wells Fargo and JPMorgan Chase? Not exactly, as it still trails far behind these banks with respect to revenue. What it does mean, however, is that Bank of America can finally phase out its defensive strategy in favor of a little offense.