Amid a swarm of sexual assault allegations, the chairman and CEO of CBS, Leslie Moonves, has stepped down from his position, putting an end to the ongoing legal battle over control of the company.

At the moment, CBS chief operating officer Joe Ianniello has been named interim CEO of the company with the replacement of six new board members being enacted as well.

“CBS is an organization of talented and dedicated people who have created one of the most successful media companies in the world,” says Shari Redstone, CBS vice chair and president of parent company National Amusements, Inc. “Today’s resolution will benefit all shareholders, allowing us to focus on the business of running CBS – and transforming it for the future. We are confident in Joe’s ability to serve as acting CEO and delighted to welcome our new directors, who bring valuable and diverse expertise and a strong commitment to corporate governance.”

The settlement that was reached will have CBS and Moonves donate $20 million to organizations that support the #MeToo movement and promote gender equality in the workplace in response to the dozens of allegations brought against Moonves. While the former CEO does have a controversial severance package valued at over $100 million, his donation will be deducted from the final amount.

“The donation, which will be made immediately, has been deducted from any severance benefits that may be due Moonves following the Board’s ongoing independent investigation led by Covington & Burling and Debevoise & Plimpton,” CBS adds. “Moonves will not receive any severance benefits at this time (other than certain fully accrued and vested compensation and benefits); any payments to be made in the future will depend upon the results of the independent investigation and subsequent Board evaluation.”

It was investigative reporter Ronan Farrow who published the two New Yorker pieces that implicated Les Moonves in accusations of sexual assault that included instances where Moonves is accused of forcing women to perform oral sex on him and exposing himself without consent. In a statement confirming his departure, Moonves continues to deny the allegations.

“Untrue allegations from decades ago are now being made against me that are not consistent with who I am,” he wrote. “Effective immediately I will no longer be Chairman and Chief Executive Officer of CBS. I am deeply saddened to be leaving the company. I wish nothing but the best for the organization, the newly comprised board of directors and all of its employees.”