certain institutions of Scotland and England remained separate, such as Scottish and English law; and the Presbyterian Church of Scotland and the Anglican Church of England. England and Scotland each also continued to have their own system of education. Meanwhile, the War of the Spanish Succession against France (1701–1714) was underway. It see-sawed back and forth until a more peace-minded government came to power in London and the treaties of Utrecht and Rastadt ended the war. British historian G. M. Trevelyan argues: Hanoverian kings The Stuart line died with Anne in 1714, although a die-hard faction with French support supported pretenders. The Elector of Hanover became king as George I. He paid more attention to Hanover and surrounded himself with Germans, making him an unpopular king. He did, however, build up the army and created a more stable political system in Britain and helped bring peace to northern Europe. Jacobite factions seeking a Stuart restoration remained strong; they instigated a revolt in 1715–1716. The son of James II planned to invade England, but before he could do so, John Erskine, Earl of Mar, launched an invasion from Scotland, which was easily defeated. George II enhanced the stability of the constitutional system, with a government run by Robert Walpole during the period 1730–1742. He built up the First British Empire, strengthening the colonies in the Caribbean and North America. In coalition with the rising power Prussia, the United Kingdom defeated France in the Seven Years' War (1756–1763), and won full control of Canada. George III never visited Hanover, and spoke English as his first language. Reviled by Americans as a tyrant and the instigator of the American War of Independence, he was insane off and on after 1788, and his eldest son served as regent. He was the last king to dominate government and politics, and his long reign is noted for losing the first British Empire in the American Revolutionary War (1783), as France sought revenge for its defeat in the Seven Years' War by aiding the Americans. The reign was notable for the building of a second empire based in India, Asia and Africa, the beginnings of the industrial revolution that made Britain an economic powerhouse, and above all the life and death struggle with the French, in the French Revolutionary Wars 1793–1802, which ended inconclusively with a short truce, and the epic Napoleonic Wars (1803–1815), which ended with