John Stumpf, the embattled CEO of Wells Fargo (WFC), retired from the company effective Wednesday.

Stumpf's move comes just weeks after he was grilled by Congressional panels over the way the company handled an alleged scam where upwards of two million accounts were created by employees. The accounts were allegedly opened so employees could meet aggressive sales goals set by management. Stumpf was widely criticized for the way he handled the questioning.

Stumpf is resigning as both CEO and chairman. The company's President and Chief Operating Officer Tim Sloan to replace Stumpf. Stephen Sanger was named as the board's non-executive chairman.