The surplus or residue of the deceased’s property, after payment of debts and legacies, shall be paid to the residuary legatee when any has been appointed by the will.