The U.S. Supreme Court has spared the Consumer Financial Protection Bureau from what would have been an existential blow, but consumer finance experts say key battles remain ahead for the watchdog agency.

In its ruling Thursday, the Supreme Court rejected a challenge from the payday loan industry to the independent funding structure of the banking and consumer finance regulator. The case threatened to not only kneecap the CFPB by removing its funding mechanism through the Federal Reserve but cast doubt over the legality of the billions of dollars in enforcement actions it has carried out since its creation by the Dodd Frank Act after the 2008 economic crisis.