Many buildings were built for administrative purposes. In the "Dar-ul-Amarat" quarters, government offices and residences for officers were sited. Diwans were constructed to house official records. Bait-ul-Mal were used to house royal treasuries. Jails were constructed for the first time in Muslim history. In important cities, guest houses were constructed to serve traders and merchants coming from faraway places. Roads and bridges were constructed for public use. On the road from Medina to Mecca, shelters, wells, and meal houses were constructed at every stage for the convenience of the people who came for hajj.