(a) (1) The court may modify the administrative or dispositive terms of a trust or terminate the trust if, because of circumstances not anticipated by the settlor, modification or termination will further the purposes of the trust.
(2) To the extent practicable, the modification described in paragraph (1) of this subsection shall be made in accordance with the probable intention of the settlor.
(b) The court may modify the administrative terms of a trust if continuation of the trust on its existing terms would be impracticable or wasteful or impair the administration of the trust.
(c) On termination of a trust under subsection (a) of this section, the trustee shall distribute the trust property in a manner consistent with the purposes of the trust as ordered by the court.