IN: Sayyid Ali Hosseini Khamenei (Persian: syd 'ly Hsyny khmnhy, pronounced [?ae'li: hosei'ni: kha:mene'?i:] ( listen); born 17 July 1939) is a marja and the second and current Supreme Leader of Iran, in office since 1989. He was previously President of Iran from 1981 to 1989. Khamenei is the second-longest serving head of state in the Middle East (after Oman's Sultan Qaboos), as well as the second-longest serving Iranian leader of the last century, after Shah Mohammed Reza Pahlavi. According to his official website, Khamenei was arrested six times before being sent into exile for three years during Mohammad Reza Pahlavi's reign.

Khamenei's era has differed from that of his predecessor. He has, however, continued Khomeini's policy of "balancing one group against another, making sure that no single side gains too much power." But lacking Khomeini's charisma and clerical standing, he has developed personal networks, first inside the armed forces, and then among the clerics, while administering the major bonyads and seminaries of Qom and Mashhad. According to Vali Nasr of the Johns Hopkins School of Advanced International Studies, "[Khamenei] [took] many of the powers of the presidency with him and [turned] the office of the supreme leader into the omnipotent overseer of Iran's political scene". In Nasr's view, Khamenei is an "unusual sort of dictator". Officials under Khamenei influence the country's various powerful, and sometimes bickering, institutions, including "the parliament, the presidency, the judiciary, the Revolutionary Guards, the military, the intelligence services, the police agencies, the clerical elite, the Friday prayer leaders and much of the media", as well as various "nongovernmental foundations, organizations, councils, seminaries and business groups". Khamenei issues decrees and makes the final decisions on economy, environment, foreign policy and everything else in Iran. Khamenei regularly meets with president, cabinet members, head and officials of the judiciary branch, parliamentarians, among others, and tells them what to do. Khamenei has also fired and reinstated Presidential cabinet appointments. Khamenei meets with foreign dignitaries, however he does not travel overseas; if anyone wishes to see him, that person must travel to Iran. Apart from his time in Najaf as a student, Khamenei travelled to Libya during his time as President. In his speeches Khamenei regularly mentions many familiar themes of the 1979 revolution: justice, independence, self-sufficiency, Islamic government and resolute opposition to Israel and United States, while rarely mentioning other revolutionary ideals such as democracy and greater government transparency. According to Karim Sadjadpour of the Carnegie Endowment for International Peace, Khamenei has "resisted Rafsanjani's attempts to find a modus vivendi with the United States, Khatami's aspirations for a more democratic Islamic state, and Ahmadinejad's penchant for outright confrontation."
QUESTION: Was he ever arrested?
IN: Selim III (Ottoman Turkish: slym thlth Selim-i salis) (24 December 1761 - 28 July 1808) was the reform-minded Sultan of the Ottoman Empire from 1789 to 1807. The Janissaries eventually deposed and imprisoned him, and placed his cousin Mustafa on the throne as Mustafa IV. Selim was subsequently killed by a group of assassins.

Selim introduced domestic reforms to strengthen his government. He solicited suggestions throughout the governing institutions. As a basis for change: he created a new treasury, filled in large part from confiscatory punishment leveled at fief holders who had ceased to respect their military obligations, schools were opened, attention was given to printing and to the circulation of Western translations, and young Turks were sent to Europe for further study. The most significant reforms, however, involved the military. The navy was strengthened, and a navigation school was opened. The army commissariat was changed, officer training was improved, the Bosphorus forts were strengthened, the artillery was revitalized, and the new engineering school was reorganized. The major innovation was the founding of a new body of regular troops known as the Nizam-i-Cedid (new regulation), a term also applied to the reforms as a whole. A former Turkish lieutenant in the Russian army formed the first of these new units, uniformed, well disciplined and drilled, in 1792. Other units followed, involving, in some instances, extensive barracks building with related town facilities, such as the mosques and baths of Scutari. Such buildings constitute Selim's major architectural legacy. Before the reforms, education in the Ottoman Empire had not been a state responsibility but had been provided by the education for Muslims. The first inroads into the system had been made with the creation of naval engineering, military engineering, medical and military science colleges. In this way specialized Western-type training was grafted onto the traditional system to produce specialists for the army. Similar institutions for diplomats and administrators were founded, including the translation bureau and the civil service school the latter was reorganized and eventually became the political science department of the University of Ankara and the major training center for higher civil servants. The first comprehensive plan for state education was put forward. It provided for a complete system of primary and secondary schools leading to the university level, all under the Ministry of Education. A still more ambitious educational plan, inaugurated in 1869, provided for free and compulsory primary education. Both schemes progressed slowly because of a lack of money, but they provided a framework within which development toward a systematic, secular educational program could take place. There were more than 36,000 Ottoman schools, although the great majority were small, traditional primary schools. The development of the state system was aided by the example of progress among the non-Muslim millet schools, in which the education provided was more modern than in the Ottoman schools included more than 1,800 Greek schools with about 185,000 pupils and some 800 Armenian schools with more than 81,000 pupils. Non-Muslims also used schools provided by foreign missionary groups in the empire
QUESTION:
how else were the schools reformed?