The functions of Ottoman government were, in essence, to raise revenue with which to support the sultan’s army and court, to conduct war and relations with foreign powers, to uphold law and order, and to support what the ruling elite regarded as the right religion. Most day-to-day public functions – for example, the construction and maintenance of mosques, education, welfare of the poor, the provision of a water supply in towns and the upkeep of bridges and cemeteries – were the responsibility of vakıfs (endowments of land or other sources of income used for the charitable purpose defined by the founder), established through the private beneficence of individuals. The founders of the greatest vakıfs were, it is true, the sultans and their ministers, and their foundations – notably the imperial mosques in Istanbul – served to project the grandeur and munificence of the dynasty. Nonetheless, they were legally autonomous institutions and, strictly speaking, outside the realm of government. The scope of Ottoman government was therefore limited but in this respect no different from the governments of other pre-modern states. Furthermore, while the problems which the Ottoman government faced between 1453 and 1603 may have grown in scale and complexity, the basic functions of government remained unchanged. Equally, the institutions and offices that were in place during the reign of Mehmed II (r. 1451–81) were still in place and, in appearance, largely unchanged in the reign of his descendant Mehmed III (r. 1595–1603).