On Friday, a judge approved a motion filed by the company to shutter around 500 of its 800 locations across the U.S.