Here was reflected the functional approach to the organization of the medieval city.In the city's main gate there was a custom house, a sort of passport office and the department of immigration which collected taxes, checked goods, and collected tariffs, which constituted an important source of income for the city.