localism in these regions. Until the thirteenth century the borders with England were very fluid, with Northumbria being annexed to Scotland by David I, but lost under his grandson and successor Malcolm IV in 1157. By the late thirteenth century when the Treaty of York (1237) and Treaty of Perth (1266) had fixed the boundaries with the Kingdom of the Scots with England and Norway respectively, its borders were close to the modern boundaries. The Isle of Man fell under English control in the fourteenth century, despite several attempts to restore Scottish authority. The English were able to annexe a large slice of the Lowlands under Edward III, but these losses were gradually regained, particularly while England was preoccupied with the Wars of the Roses (1455–85). The dowry of the Orkney and Shetland Islands in 1468 was the last great land acquisition for the kingdom. However, in 1482 Berwick, a border fortress and the largest port in Medieval Scotland, fell to the English once again, for what was to be the final change of hands. Economy and society Economy Having between a fifth or sixth (15-20%) of the arable or good pastoral land and roughly the same amount of coastline as England and Wales, marginal pastoral agriculture and fishing were two of the most important aspects of the Medieval Scottish economy. With poor communications, in the Early Middle Ages most settlements needed to achieve a degree of self-sufficiency in agriculture. Most farms were based around a family unit and used an infield and outfield system. Arable farming grew in the High Middle Ages and agriculture entered a period of relative boom between the thirteenth century and late fifteenth century. Unlike England, Scotland had no towns dating from Roman occupation. From the twelfth century there are records of burghs, chartered towns, which became major centres of crafts and trade. and there is evidence of 55 burghs by 1296. There are also Scottish coins, although English coinage probably remained more significant in trade and until the end of the period barter was probably the most common form of exchange. Nevertheless, craft and industry remained relatively undeveloped before the end of the Middle Ages and, although there were extensive trading networks based in Scotland, while the Scots exported largely raw materials, they imported increasing quantities of luxury goods, resulting in a bullion shortage and perhaps helping to create a financial crisis in the