All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
We have already issued Fatwa 85091 about how to make a will, so please refer to.
As regards the second part of your question, if a husband dies and has no children and leaves behind him a wife, then she gets one-fourth of the inheritance, and if a wife dies and has no children and leaves a husband, the latter will get half of the inheritance. Whatever remains after that, will be divided amongst other heirs, i.e. the parents if any, but if there are no parents, then it is the grandfather and grandmother, then the brothers and sisters or their children. If there are none of these, then it will be the uncles or their children.
In case there are no heirs at all, then the scholars differed in opinion in this matter. Some of them said that the money (wealth) will be given to the kinship; this is according to the Hanbali School of jurisprudence, as stated in the book entitled Al-Mughni edited by Ibn Qudaamah and in the book entitled Al-Insaaf written by Al-Mardaawi .
This is also the view of the Hanafi School of jurisprudence.
Other schoalrs are of the view that this wealth goes to the treasury and the kinship will not get anything from it; this is the view adopted by Ash-Shaafi'i and Maaliki Schools of jurisprudence. ATh-Thaahiria School holds the same opinion. However, the later scholars of the Shaafi'i and Maaliki Schools of jurisprudence are of the view that if the treasury is not organized, the inheritance should be given to the kinship as already mentioned.
Anyway, the preponderant opinion -Allaah knows best- is that the kinship come in priority over the treasury, as Allaah Says (what means): {…But those of [blood] relationship are more entitled [to inheritance] in the decree of Allaah. Indeed, Allaah is Knowing of all things.} [Quran 8:75]. Allah further Says (what means): {For men is a share of what the parents and close relatives leave…} [Quran 4:7]
In addition to this, the Prophet said: "The maternal uncle is a heir for anyone who has no heirs." [Ahmed, Abu Dawood, Ibn Majah and At-Tirmithi who classified it as Hassan [Sound]
The controversy is when there are treasury and kinship, but if there is no kinship, then there is no difference (of opinion) that the inheritance goes to the treasury if it is organized. If the treasury is not organized then, in this case, the inheritance goes to the general benefit of the Muslims.
Finally, it should be noted that the matter of inheritance is very complex an issue, so a mere Fatwa which is an answer issued according to the question is not enough. Rather, the matter should be taken to an Islamic court to look into the case, or it should be presented orally (in person) to the scholars in case there are no Islamic courts. It might be that there is an heir who would not be known except after investigation, and there might also be a will, debts, or other dues that are not known to the heirs. It is known that these rights come in priority over the right of the heirs. Therefore, the inheritance should not be divided without resorting to an Islamic court, if any, in order to fulfill the interests of the dead and the live people.
Allaah Knows best.