When the debts, funeral charges, and expenses of administration, the allowance to the widow, and inheritance tax, if any, chargeable to the estate in accordance with law, have been paid, the court, on the application of the executor or administrator, or of a person interested in the estate, and after hearing upon notice, shall assign the residue of the estate to the persons entitled to the same, naming them and the proportions, or parts, to which each is entitled,