Tyrol had no law code at this time, the nobility freely expropriated money from the populace, which caused the court in Innsbruck to fester with corruption. After taking control, Maximilian instituted immediate financial reform. Gaining control of Tyrol for the Habsburgs was of strategic importance because it linked the Swiss Confederacy to the Habsburg-controlled Austrian lands, which facilitated some imperial geographic continuity. Maximilian became ruler of the Holy Roman Empire upon the death of his father in 1493. Italian and Swiss wars As the Treaty of Senlis had resolved French differences with the Holy Roman Empire, King Louis XII of France had secured borders in the north and turned his attention to Italy, where he made claims for the Duchy of Milan. In 1499–1500 he conquered it and drove the Sforza regent Lodovico il Moro into exile. This brought him into a potential conflict with Maximilian, who on 16 March 1494 had married Bianca Maria Sforza, a daughter of Galeazzo Maria Sforza, duke of Milan. However, Maximilian was unable to hinder the French from taking over Milan. The prolonged Italian Wars resulted in Maximilian joining the Holy League to counter the French. His campaigns in Italy generally were not successful, and his progress there was quickly checked. Maximilian's Italian campaigns tend to be criticized for being wasteful and gaining him little. Despite the emperor's work in enhancing his army technically and organization-wise, due to financial difficulties, the forces he could muster were always too small to make a decisive difference. In Italy, he gained the derisive nickname of "Massimiliano di pochi denari" (Maximilian the Moneyless). One particularly humiliating episode happened in 1508, with a force mustered largely from hereditary lands and with limited resources, the emperor decided to attack Venice. The diversionary force under Sixt Trautson were routed by Bartolomeo d'Alviano (Sixt Trautson himself was among the fallen), while Maximilian's own advance was blocked by the main Venetian force under Niccolò di Pitigliano and a French army under Alessandro Trivulzio. Bartolomeo d'Alviano then pushed into the Imperial territory, seizing Gorizia and Trieste, forcing Maximilian to sign a very unfavourable truce. Afterwards, he formed the League of Cambrai together with Spain, France and Pope Julius II and won back the territories he had conceded and some Venetian possessions. Most of the Slovene-inhabited areas were transferred to the Habsburgs. But atrocities and expenses for war devastated Austria and Carniola. Lack of financial