UPDATE with statements from Relativity and Ryan Kavanaugh’s lawyer: U.S. Bankruptcy Court Judge Michael Wiles’ impatience with Relativity Media’s complicated, eleventh-hour filings in the case boiled over in a hearing this morning to go over a debtor-in-possession (DIP) financing plan submitted in the middle of the night.

“It would be hard for me, with a document filed at 1:30 in the morning, to approve it at 11:00,” the judge said.

Relativity agreed to offer clarified documents well ahead of a hearing to go over it this Tuesday afternoon. The existing DIP loan will be continued until then.

The filing updating DIP funding terms was “about as opaque as could be” — and would require word-by-word comparisons with previous filings — Wiles said. “I can’t possibly comprehend the order or amendment to the DIP agreement” which refers to “a lot of agreements over the last few days that I haven’t even seen.”

Relativity lawyer Bennett Spiegel says that a group controlled by Paul Singer’s hedge fund Elliott Associates, and its Manchester Securities subsidiary, has taken over the DIP loan, which originally gave Relativity $49.5 million but had been revalued to $35 million.

A buying group led by CEO Ryan Kavanaugh will have to repay half of that, $17.5 million, by the time Relativity restructures — expected in January. The remainder might be converted into equity.

Negotiations also are taking place to determine the fate of a $125 million loan from several hedge funds. Spiegel says that in the end Relativity will be left with no more than $60 million in debt.

“If all goes as it should, upon exit from bankruptcy something like a half-billion dollars from the balance sheet will be converted to equity or disappear,” Spiegel says. “It has not happened yet, but we’ve taken enormous steps to get us there.”

After the hearing Relativity released this statement about the proceeding:

“Today the US Bankruptcy Court simply asked attorneys for Relativity and its lenders to redline the filing regarding Relativity’s debtor-in-possession financing before approving it and remove other documents which do not need the Court’s blessing, which is fully expected at a hearing on Tuesday. The acquisition by the Ryan Kavanaugh-led investor group of the company’s outstanding senior secured debt has in fact closed and does not need Court approval. Any suggestion to the contrary is simply not true, irresponsible, and a mischaracterization of what took place.”

Kavanaugh’s lawyer, Van Durrer II of Skadden, Arps, Slate, Meagher & Flom,  released a separate statement:

“Today was a great day. As we advised the Court Tuesday, the company closed its TV sale and arranged new DIP financing that is an integral part of Relativity’s planned emergence from chapter 11 in early 2016.

All the parties confirmed that they were in agreement, including those who had raised questions concerning the financing. The “TJ” parties, Elliott, the Cortland lenders, and new investors presented a fully agreed upon deal which was explained to the Court today. The parties have put up the equity and everyone has signed the deal and funded.

Anything implied to the contrary is inaccurate . The Judge merely wanted a more focused presentation and thanked the parties for their hard work and collaboration.

As we completed the documents late last night last after all parties funded, the package was not submitted to the Court until early Thursday morning. It is reasonable for the Court to request additional time and a shorter presentation to review the materials. We expect to provide that by close of business tomorrow.

All parties involved, including the Official Committee of Unsecured Creditors, today spoke and expressed their support and blessing of the overall deal, including, but not limited to, the Ryan Kavanaugh-led investor group funding plan.”