(a) The court, in ordering relief pursuant to this article, shall distribute the moneys in the escrow account and moneys which may later be payable under the contract, in the following priority:
(1) Payments authorized by the court for the exclusive purpose of retaining legal representation at any stage of the criminal proceedings against such defendant;