When the town was independent again, once more it became a strategic point between Arezzo and Perugia. At times it was Guelph – Papacy – and, at times, Ghibelline – Emperor. After the reign of Federico II the town was near Florence and it returned to the Church, apart a few brief periods. There were still pockets of Longobard resistance. Between 1257 and 1283 the town grew fast and the “Porte” – entrance doors to the city – increased from four to eight. In 1230 the official name of the town became Civitas Castelli. In1260 new laws were designed to give more power to the “Capitano del Popolo” and less to the “Podestà”. The ‘servants of the gleba’ – very widespread in the Middle Ages that tied the farmer to a certain land, halfway between the slave and the free man – were freed in 1270 and the town prepared a new statute. In 1323/1325 the town was controlled by the Tarlatis of Pietramala, who were allied to the ghibellines of Arezzo. The nearby town of Sansepolcro was governed by the Malatesta of Rimini. The Florentines were very influential in this period because they were related to the Malatestas and friends of the Pietramalas. The town was very prosperous and continued to be so until the Renaissance. In 1334 there was an insurrection and in 1336 the town was put into the hands of eight priors. The vicar, commissioned by the Pope, appeared in these years as did the council of the “otto di balia”. There were 56 art and craft corporations including tailors, shoemakers and tanners, but the wool merchants were the most powerful and successful. Their workshops attracted merchants from Florence. At the end of the 13th century, the Vitelli family had already affirmed its power in town. The university of the wool merchants, or Lanari, gave its name to the San Giacomo Hospital. There were many other categories at work in town, such as lawyers, carpenters and millners. In the country side, the manorial system was gradually altered and sharecropping was introduced.