almost all using it from the reign of James I onwards. As a result, Gaelic, once dominant north of the Tay, began a steady decline. Lowland writers began to treat Gaelic as a second class, rustic and even amusing language, helping to frame attitudes towards the highlands and to create a cultural gulf with the lowlands. Education The establishment of Christianity brought Latin to Scotland as a scholarly and written language. Monasteries served as major repositories of knowledge and education, often running schools and providing a small educated elite, who were essential to create and read documents in a largely illiterate society. In the High Middle Ages new sources of education arose, with song and grammar schools. These were usually attached to cathedrals or a collegiate church and were most common in the developing burghs. By the end of the Middle Ages grammar schools could be found in all the main burghs and some small towns. Early examples including the High School of Glasgow in 1124 and the High School of Dundee in 1239. There were also petty schools, more common in rural areas and providing an elementary education. Some monasteries, like the Cistercian abbey at Kinloss, opened their doors to a wider range of students. The number and size of these schools seems to have expanded rapidly from the 1380s. They were almost exclusively aimed at boys, but by the end of the fifteenth century, Edinburgh also had schools for girls, sometimes described as "sewing schools", and probably taught by lay women or nuns. There was also the development of private tuition in the families of lords and wealthy burghers. The growing emphasis on education cumulated with the passing of the Education Act 1496, which decreed that all sons of barons and freeholders of substance should attend grammar schools to learn "perfyct Latyne". All this resulted in an increase in literacy, but which was largely concentrated among a male and wealthy elite, with perhaps 60 per cent of the nobility being literate by the end of the period. Until the fifteenth century, those who wished to attend university had to travel to England or the continent, and just over a 1,000 have been identified as doing so between the twelfth century and 1410. Among these the most important intellectual figure was John Duns Scotus, who studied at Oxford, Cambridge and Paris and probably died at Cologne in 1308, becoming