the house at Crawfordjohn, the "New Inn" in the St Andrews Cathedral Priory and the lodging at Balmerino Abbey for the ailing Queen Madeleine. Rather than slavishly copying continental forms, most Scottish architecture incorporated elements of these styles into traditional local patterns, adapting them to Scottish idioms and materials (particularly stone and harl). Similar themes can be seen in the private houses of aristocrats, as in Mar's Wark, Stirling (c. 1570) and Crichton Castle, built for the Earl of Bothwell in 1580s. Sixteenth and seventeenth centuries In the period of French intervention in the 1540s and 1550s, at the end of the Rough Wooing, Scotland was given a defended border of a series of earthwork forts and additions to existing castles. These included the erection of single bastions at Edinburgh, Stirling and Dunbar. The unique style of great private houses in Scotland, later known as Scots baronial, has been located in origin to the period of the 1560s. It kept many of the features of the high walled Medieval castles that had been largely made obsolete by gunpowder weapons and may have been influenced by the French masons brought to Scotland to work on royal palaces. It drew on the tower houses and peel towers, with their parapets, corbels, and bartizans. The new estate houses built from the late sixteenth century by nobles and lairds were primarily built for comfort, not for defence, although they were often called castles. They retained many of these external features which had become associated with nobility, but with a larger ground plan. This was classically a "Z-plan" of a rectangular block with towers, as at Colliston Castle (1583) and Claypotts Castle (1569–88). Particularly influential was the work of William Wallace, the king's master mason from 1617 until his death in 1631. He worked on the rebuilding of the collapsed North Range of Linlithgow from 1618, Winton House for George Seton, 3rd Earl of Winton and began work on Heriot's Hospital, Edinburgh. He adopted a distinctive style that applied elements of Scottish fortification and Flemish influences to a Renaissance plan like that used at Château d'Ancy-le-Franc. This style can be seen in lord's houses built at Caerlaverlock (1620), Moray House, Edinburgh (1628) and Drumlanrig Castle (1675–89), and was highly influential until the baronial style gave way to the grander English forms associated with Inigo Jones in the later seventeenth century, which were used to produce