Wells Fargo will pay $575 million in a settlement with attorneys general from all 50 states and the District of Columbia that are investigating fake accounts opened without the knowledge of customers and a string of other dodgy practices.

Under the agreement announced Friday, the bank will also create teams to review and respond to customer complaints about its banking and sales practices.

The bank has been under a cloud since 2015 when it acknowledged that employees had opened millions of fake bank accounts for customers in order to meet sales goals. It has also said that it sold auto insurance and other financial products to customers who didn’t need them.

Wells Fargo has already been ordered to pay more than $1.2 billion in penalties and faced stricter regulations.

“This agreement underscores our serious commitment to making things right in regard to past issues as we work to build a better bank,” said CEO Tim Sloan.

Tim Sloan apologized for the phony accounts and other practices during a congressional hearing in 2017, but the company remained under pressure from the weight of all the scandals. The company has announced plans to lay off up to 10 percent of its workforce over the next three years.

California, the bank’s home state, will get more than a quarter of the settlement funds because of the number of Wells Fargo customers residing there.

California Attorney General Xavier Becerra called the bank’s behavior “disgraceful”.

“Wells Fargo customers entrusted their bank with their livelihood, their dreams, and their savings for the future,” said Becerra. “Instead of safeguarding its customers, Wells Fargo exploited them, signing them up for products - from bank accounts to insurance - that they never wanted. This is an incredible breach of trust that threatens not only the customers who depended on Wells Fargo, but confidence in our banking system.”