and 18th Centuries, including the Casa Simona (16th to 18th century), the Casa Rusca from the first half of the 18th century (now the seat of the municipal art gallery) and the Casa del Negromante, were built on older structures and didn't change the layout of the town. Locarno's castles There were several castles from the Early Middle Ages in Locarno. One was destroyed by the Milanese in 1156. Another, first mentioned in 1210 as Orelli castle, was occupied in 1342 by the Visconti and enlarged. This castle came to be known as Visconti Castle. In 1531, the Confederates demolished much of the castle, leaving only the central core. The castle was used as the residence of the governor, but in the following centuries, it began to fall apart. From 1804 to 1909, the castle was the seat of the administrative governor and the District Court. After 1909, it came into the possession of the city and was renovated in 1921–28. Since 1920, it houses the city and Archaeological Museum. In 1507, a defensive bastion or ravelin was added to protect the castle entrance. It is likely that Leonardo da Vinci designed this structure. North-east of the castle is Palazzo Casorella (Casa degli Orelli) from the 16th century. Early modern Locarno During the Middle Ages, the economy of Locarno and the whole region was closely linked with the nobles who owned the market, fishing, alpine and grazing rights and tithes. Starting in the 13th century, some of these privileges went to the citizens' corporation. The hill areas were dominated by viticulture, while grain was raised in the plains. Within the town, vegetables and fruits were grown. Artisans and stores were concentrated in the interior of the town. The repeatedly flooded shorelines and the alpine pastures were used for grazing. In the early modern period, Locarno developed into a thriving commercial center on an important road that linked the major cities of Lombardy, with German-speaking Switzerland and Germany. Cereals and salt came from Lombardy and Piedmont to Locarno, while Locarno and its hinterland (especially the Maggia Valley) provided large quantities of wood and cattle to Italy. The parish church of Locarno, S. Antonio Abate, was first built in 1353–54. It was replaced by the current building in 1664. The decoration of the church was financed, primarily, by the grain traders at the end of the 17th century, and the chapel frescoes