Over many years, space along the Qasaba avenue steadily narrowed as new constructions encroached on it and open spaces disappeared. As the main street became saturated with shops and space for further development there ran out, new commercial structures were instead built further east, close to al-Azhar Mosque and to the shrine of al-Hussein, where some space was still available. Furthermore, instead of mobile market stalls that were assembled in open spaces, the city's souq areas were progressively replaced by fixed stone structures with spaces for shops. This was in part a consequence of the authorities wishing to impose greater order on commercial activities; fixed structures could be counted, taxed, and regulated more easily than makeshift market stalls that could come and go. During the Mamluk period, as the city became denser and space ran out, builders preferred to build multi-storied structures known as a "khan" (Arabic: خان) or a "wikala" (Arabic: وكالة), both terms for urban variants of a caravanserai (an inn for merchants). These types of buildings were centered around an inner peristyle courtyard where merchants could store their goods, with upper levels used as living quarters. The street facades of these buildings generally had spaces for shops at ground level, and in this way a commercial zone could extend around and between multiple khans.