Plenty of people limped away from this year’s regular legislative session feeling bitter.

Tenants’ rights advocates saw their bid for rent control perish. Public-sector unions failed to win higher taxes on corporations. And air quality advocates lost a shot at tighter regulations.

Civil liberties advocates, on the other hand, came away from Salem feeling chipper about criminal justice reform.

“They’re all really monumental,” ACLU of Oregon Executive Director David Rogers says of a number of bills passed in the final days of the session. “The US Attorney General and the Trump administration have been trying to ramp up the war on drugs, and Oregon’s heading in the opposite direction. At a time where [Attorney General] Jeff Sessions has been uninterested in police misconduct, Oregon’s moving in the opposite direction.”

Rogers is particularly thrilled about several accomplishments: One bill requires law enforcement to track demographic data on people they stop and reduces consequences for personal drug possession charges, while another requires audio recordings of grand jury proceedings. A bill that should reduce incarceration rates and eliminate the need for the state to build another women’s prison is also a win, he says.

“These are three major bills that advocates from around the state were really focused on,” Rogers says. “It’s a big deal, a really big deal.”

Here’s a look at some of the bigger bills passed last week, all of which Governor Kate Brown is expected to sign into law.

House Bill 2355—Racial profiling data, drug sentencing reform

This bill is designed to quantify and address racial profiling by cops and reduce drug possession charges for those caught with small amounts of narcotics. It passed 36-23 in the House and 20-9 in the Senate, with only one Democrat in the legislature opposing it and six Republicans supporting it.

Under the bill, law enforcement agencies will soon be required to collect and submit to the state data on the age, race, and gender of those they choose to stop. The state will analyze the information to look for concrete evidence of profiling, and then provide training and oversight to stop it.

“This is huge, huge, huge,” Rogers says. This kind of information gathering was previously optional for departments—leading to anecdotal accusations of profiling. “Data really is critical to be able to address the problem. Without the data, it’s hard to identify which agencies are having significant issues to target with training and accountability.”

The second part of the bill changes sentencing for those busted possessing “user” amounts of drugs. What could have been felony convictions will now be misdemeanors. For some politicians, this was slightly more controversial than the racial profiling data aspect of the bill.

“All of us bemoan the avalanche of drugs sweeping through our communities,” said state Senator Betsy Johnson of Scappoose, the lone Democrat to vote against the bill, as quoted in the Statesman Journal. “Cleverly embedded in a bill that prohibits the odious practice of racial profiling, we are simultaneously accelerating the scourge of drugs decimating communities and killing our kids.”

House Speaker Tina Kotek of Portland disagreed with the Johnson’s premise: “Felony sentences for small, user quantity amounts often carry heavy consequences including barriers to housing and employment which have a disparate impact on minority communities,” the Salem paper quoted her saying.

The ACLU echoes Kotek’s position.

“Year-to-year, you’ve got about 4,000 people who end up with [possession of a controlled substance (PCS)] convictions throughout Oregon,” Rogers says. “Black people and Native Americans, particularly, were much more likely to wind up with a PCS conviction than white Oregonians. Pairing this with the profiling provisions, I think Oregon is in a significantly better place.”

Senate Bill 505—Grand jury recordings

Prior to the 2017 legislative session, Oregon and Louisiana were the only two states in the country that didn’t require audio recordings of grand jury proceedings, in which prosecutors provide evidence for potential felony indictments. Now it’s just Louisiana, thanks to a 21-7 vote in the Senate and 34-26 vote in the House. Most Democrats and Senate Republicans supported the bill, while most House Republicans opposed it.

The grand jury system has been an especially secretive process in Oregon, Rogers says, leading to distrust in the system when police officers are cleared of criminal wrongdoing.

In most instances around the state, it’s unknown how prosecutors actually pursued indictments. (Did they go soft on a police officer who killed someone? Were they unfairly harsh to a civilian?) Under current law, a single grand juror is tasked with taking handwritten notes of the proceedings, much to the ire of defense attorneys and reform advocates who have been pushing change for decades. In Recent years, Multnomah County has been voluntarily recording and releasing transcripts of grand jury hearings into police shootings.

“Justice isn’t justice if it happens behind closed doors and it’s a mystery,” says Rogers. District attorneys “have complete control of the process and all the power to decide how to explain the law to the grand jury—what information to share and what information not to share, what witnesses to bring forward and what ones not to.”

Some Republican legislators who voted against the bill, like state Senator Kim Thatcher of Keizer, said recording the proceedings may make witnesses more hesitant to testify.

House Bill 3078—Prison diversion for women

House Bill 3078, known as the “2017 Safety and

Savings Act,” reduces mandatory minimum sentences for some property crime, expands a prison diversion program for women, and expands funding for the treatment of addiction as well as programs dealing with domestic and sexual violence.

The bill, advocates argue, would keep the incarceration population down, thwarting the need for the state to build an additional women’s prison that would have cost millions of dollars. (The Coffee Creek Correctional Facility, the state’s sole prison for women, is overcrowded.)

“This is huge,” Rogers says. “For Oregon to be essentially on the verge of opening a new women’s prison at a time when we’re experiencing a severe budget deficit would have been a terrible place to be.”

Some major non-criminal justice bills passed last week, too.

House Bill 2017—Transportation package

Over the next decade, HB 2017 is expected to raise more than $5 billion from increases to gas taxes, car registration fees, payroll taxes, potential tolls on Portland highways, and taxes on new car and bike purchases (yes, that’s right, a bike-specific tax—the first of its kind in the nation).

And via tolls on I-5 and I-205, the state may fund new lanes for Portland-area highways.

Money collected thanks to HB 2017 will be used for road maintenance, to increase public bus services throughout the state, to create more bike and pedestrian paths, to give $12 million in annual rebates to people who buy completely electric cars, and more.

The bike tax—a $15 fee when purchasing new adult bikes that cost at least $200—is obviously controversial.

“So there you have it,” wrote Bike Portland’s Jonathan Maus. “We are taxing the healthiest, most inexpensive, most environmentally friendly, most efficient, and most economically sustainable form of transportation ever devised by the human species.”

House Bill 3391—Abortion coverage protection

Oregon’s legislature passed a bill strongly supported by reproductive rights advocates that will require most insurers to cover birth control and other reproductive healthcare for women, should Congress repeal the Affordable Care Act.

“Oregon’s bill is a powerful defense, at the state level, of necessary reproductive health care,” the New York Times editorial board wrote earlier this year, endorsing the law.

Oregon Republicans are, of course, mad.

“We are both a sanctuary state for illegal aliens, and we are a sanctuary state for federally illegal, taxpayer subsidized abortion,” said Sen. Dennis Linthicum of Klamath Falls, as quoted by ABC News. “We should not be showering politically well-connected abortion clinics with political gift cards under the guise of ‘equity.’”