Gov. Jerry Brown bucked prosecutors and some other law enforcement groups Wednesday, signing a package of bills, including some that will shorten many prison and jail sentences for both juveniles and adults.

Brown has made rolling back some of California’s harsh sentencing laws one of his signature issues, and several of the bills he signed Wednesday build upon laws and policies he’s pushed over the past seven years. His office described the package as “legislation to improve criminal and juvenile justice systems, restore the power of judges to impose criminal sentences and reduce recidivism through increased rehabilitation.”

Among the measures are two bills that will make both young and elderly prisoners eligible for parole sooner. In a signing message attached to the bill dealing with elderly prisoners, the governor urged lawmakers to go even further next year and broaden the pool of eligible inmates, saying an existing program to parole older prisoners that was imposed by a federal court but had not previously been codified into law shows that there’s no risk to public safety.

“This has been a successful program that saves the state a significant amount of money that would otherwise be spent caring for geriatric prisoners who no longer pose a risk to public safety,” he wrote.

Brown also signed bills that take on so-called sentencing enhancements — years added automatically to the sentences of people with criminal histories who are convicted of a new crime. Senate Bill 180 eliminates extra jail time for people convicted of minor drug crimes; SB 620 will allow judges to decide whether extra jail or prison time should be added on if someone uses a gun in a crime. Previously, judges did not have that discretion.

Sen. Steven Bradford, who wrote the gun bill, said it will help make the criminal justice system more equitable.

“History has shown that there are implicit biases when it comes to charging and sentencing our minority and lower socially economic communities,” he said. “By providing greater options such as comprehensive rehabilitation, that reduces recidivism and judicial discretion, which allows our courts to mete out justice in a more fair and hopefully color blind manner, we will balance the scales of justice and reduce incarceration.”

Sentencing enhancements were the subject of Proposition 57, a ballot measure authored by the governor and passed by voters last year. At the time, he said he would have gone even further limiting those enhancements if he felt it was politically feasible.

Bail or Jail? Tool Used by San Francisco Courts Shows Promising Results

Brown also signed several measures that will make it easier for adults and juveniles who are arrested but not charged with crimes to have their records sealed, and another that will let some juveniles convicted of misdemeanors have their records sealed.

Criminal justice reform advocates praised the bills, as did Sens. Ricardo Lara and Holly Mitchell — both Los Angeles Democrats. Mitchell and Lara teamed up to author a number of the measures

Brown also signed a bill that will require youths 15 and younger to consult with a lawyer before they can waive their Miranda rights. He vetoed a similar measure last year.

“Science is clear, young people are different, and as such have the capacity to change and become productive members of society,” Lara said, adding that the laws “will give them that opportunity.”

“Sadly, too many poor kids and kids of color today are more likely to end up as victims of the juvenile justice system,” added Mitchell. “If one believes that our children will be tomorrow’s leaders, then we must look through a child development lens. These bills help provide the appropriate resources and policies to get them there.”

Critics of the state’s recent criminal justice reforms say they’re contributing to an uptick in crime, especially property crimes such as car break-ins and burglaries. But some public safety researchers say it’s too soon to draw that conclusion, since crime rates have gone up and down since the reforms have been implemented.