The judge overseeing Houghton Mifflin Harcourt’s Chapter 11 proceedings approved the company’s restructuring plan Thursday morning, clearing the way for the publisher to emerge from bankruptcy. The plan, which received the full support of HMH’s creditors, will eliminate about $3 billion of debt, mainly by exchanging debt for equity.

The only glitch in what has been a smooth route through bankruptcy was the decision by Judge Robert Gerber to move the case to another court at the request of a bankruptcy watchdog. The new court will take over the remaining proceedings in the case either on the date the plan becomes effective or three weeks after his confirmation order is entered, whichever comes first. A final confirmation order is expected shortly.

HMH first filed for bankruptcy May 21, and cited debts of $3.5 billion as of March 31, compared with assets with a book value of nearly $2.7 billion.