Winegrowing, fishing, trade and handicrafts helped the town gather enough wealth to begin work on the town walls in 1220, building them in three phases from then until the mid 14th century. The town's importance in the Middle Ages can be gathered from the two great ecclesiastical foundations that it harboured (Our Lady's – or "Liebfrauen" in German – and Saint Martin's), as well as the two monasteries and the "Beginenhof". All together, nine monasteries had sizeable commercial holdings in town.