The ultimate goal of the mission was to organize free and fair elections for a Constituent Assembly which would write a constitution for the nation. In preparation, a number of legal changes were demanded. On 12 June, AG Pienaar proclaimed a general amnesty for Namibians living abroad, and repealed or amended 56 discriminatory laws. He also authorised the release of political prisoners and captured combatants, who were resettled under UNTAG's supervision. SWAPO was also required to release captured members of South African security forces. Both SWAPO and South Africa claimed that the other side continued to hold prisoners, accusations repeatedly denied by each. Alleged detention locations were searched by UNTAG personnel and the lists of missing persons were examined and eventually reduced to just over 300 unaccounted for individuals. Refugees were also assisted after the amnesty. Many were airlifted into the country, registered, and given aid. The repatriation and resettlement of refugees was one of the most widely celebrated and successful functions of UNTAG, while the conflict over the release of prisoners was one of the most difficult.