The U.S. House Judiciary Committee on Wednesday approved a bill requiring a code of ethics for the U.S. Supreme Court after intense and often bitter debates between Republican and Democratic members over scandals involving the court and individual justices.

The committee voted 22-16 along party lines to send the bill to the full House after more than six hours of debate. The bill, H.R. 7647, is titled the “Supreme Court Ethics, Recusal and Transparency Act.” Lawmakers spent most of their time going back-and-fourth over a leaked draft opinion that would unwind two key precedents allowing abortion, Justice Clarence Thomas’ sole dissent in a Jan. 6 case involving former President Donald Trump and claims of a “stolen” election, claims of sexual impropriety involving justices before they joined the bench, and efforts to pack the court.