back to the middle of the wall, the ancient fortifications were improved, the chapel was shifted from the southern part to the northern part (today's Musical Hall), and 2 new towers were added – yielding in sum the present 4 towers in the corners. As a reward for not having misappropriated state funds during the conversion, the Diet appointed Count Paul Pálffy lifelong captain of Pressburg Castle, county head of the Pozsony county and usufructuary of the castle (which remained in possession of the crown) in 1650. One year later, the emperor made those functions and titles hereditary for the Pálffys. In 1653, all wooden ceilings turned out to be bad and had to be replaced in the following years, so that precious paintings placed on them got lost. Ten years later, facing one of frequent Turkish (Ottoman) attacks to the territory of Slovakia, the fortifications were improved under the leadership of the military engineer Josef Priami of the Imperial Court in Vienna. Further improvements of the fortifications followed around 1673. They ended with the final defeat of the Turks at Vienna in 1683. In 1703, barracks were built in the north-east of the site and the armoury was turned into barracks too. The present-day Vienna Gate was constructed on the occasion of the coronation of Emperor Charles VI in 1712 and it was used as the main entrance to the castle site since then. The Maria Theresa conversion When Maria Theresa of Austria became the queen of the Kingdom of Hungary in 1740, she promised to the nobles of the kingdom that she would have a residence both in Austria and in the Kingdom of Hungary – that is in Pressburg Castle. She kept the promise and spent much time in Bratislava. A corresponding conversion of the defense castle into a (at that time) modern royal residence was performed between 1761 and 1766. Minor changes however were done as early as from 1740 onwards: besides various changes in the interior, a large garden was added in the northern part of the site and Emperor Francis I (Maria Theresa's husband, who was interested in botany) created a small garden to the east of the castle building. The chief designer until 1757 was J. B. Martinelli. The Hungarian orders supported Maria Theresa with "Vitam et Sanguinem" exclamation marks in the castle at Seven Years' War's time. Major changes inside the castle