A small St. Louis suburb has agreed to stop trying bankroll its government with a vicious regime of petty fines so excessive that the town has cited more than a third of its population.

Credit goes to the Institute for Justice, which sued the tiny town of Pagedale (population: 3,300) on behalf of a handful of residents in 2015. Amid the outrage over Michael Brown's death in nearby Ferguson, citizens of these small fiefdoms drew attention to these governments' propensity to bankroll themselves via exorbitant traffic and code enforcement fines.

Pagedale was one of those communities. In the course of a single year, it handed out 2,000 code enforcement citations—almost twice the number of actual households in the city. It tossed out tickets like confetti for a host of really absurd codes, which banned everything from mismatched curtains to holes in window screens to having your pants below your waist to having a barbecue grill or basketball hoop in your front yard to walking on the left side of a crosswalk.

The town's budget depended heavily on these fines. In some years, their proceeds made up a quarter of the city's revenue, according to the Institute for Justice. And the code citations got worse once the state cracked down to stop cities from trying to rake in money from traffic tickets. Eventually, 39 percent of the city's adult population had been fined for some sort of housing violation.

The courts then deliberately rushed through the cases and made it hard for residents to object or respond, saddling some citizens with thousands of dollars in debt. One of the plaintiffs represented by the Institute for Justice received nearly $3,000 in citations which he was struggling to pay off. And because he was spending the money to pay the fines, he couldn't afford the repairs the city demanded, resulting in more citations. Eventually the city threatened to raze his home. Another one of the institute's clients had to turn to payday loans to try to keep up with the fines.

Relief is now on the way. On Friday a federal judge accepted a consent decree from the City of Pagedale to reform its practices. The town has agreed to repeal the parts of municipal code that allowed them to cite citizens for conditions that were not public health or safety hazards. The decree specifically mentions that the aforementioned restrictions on pants, grills, and crosswalk practices will be repealed. The city won't be able to manufacture some sort of public safety excuse to keep them intact.

Furthermore the city will stop prosecuting current cases like these unless the prosecutor can find good cause to do so; will dismiss any additional fines and fees on citizens who have already paid more than their initial fine for a citation; will stop incarcerating people for these municipal violations if they don't have counsel and have not agreed to waive their rights; and will make the courts more accessible, with a broader range of hours and a rule limiting the number of hearings per session to seven, as opposed to the more than 200 proceedings that had previously churned through on some days.

The Institute for Justice is celebrating the win:

"Across the country, the government has resorted to using policing for profit to wrest money from individuals who are often the poorest and most vulnerable among us," said IJ President Scott Bullock. "This case, like IJ's work in fighting civil forfeiture, is a vital part of IJ's efforts to end this abusive and short-sighted practice. Because the Constitution forbids the government from using the justice system as a means to raise revenue, IJ will continue this fight across the country."

Read more about the case here, and read the consent agreement itself here.