Ulster. This may have caused the new king, MacAlpin, to move to the east, and conquer the remnants of the Pictish realms. MacAlpin became king of the Picts in 843 and later kings would be titled as the King of Alba or King of Scots. Art Art in the 9th century was primarily dedicated to the Gospel and employed as basic tools of liturgy of the Roman Orthodox Church. Thousands of golden art objects were made: Sacred cups, vessels, reliquaries, crucifixes, rosaries, altarpieces, and statues of the Virgin and Child or Saints all kept the flame of western art from dying out. Architecture began to revive to some extent in the West by the 9th century, taking the form of Church facilities of all kinds, and the first castle fortifications since Roman times began to take form in simple "moat and bailey" castles, or simple "strong point" tower structures, with little refinement. Events 800s: Southeast Asian kingdoms of Muja (then Pagan Brunei/Vijayapura) and Mayd (Ma-i) waged war against the Chinese Empire. 802: Jayavarman II of the Khmer people in Cambodia founds the Khmer empire and establishes the Angkorian dynasty. 803: Construction on the Leshan Giant Buddha in Tang Dynasty China is complete, after 90 years of rock-carving on a massive cliff-side. 805–820: Tang Dynasty was under the rule of Emperor Xianzong of Tang. 809–815: War between the Byzantine empire and Bulgaria. 811: Battle of Pliska fought between a Byzantine force led by emperor Nicephorus I and a Bulgarian army commanded by Khan Krum. Byzantines are defeated in a series of engagements, culminating with the death of Nicephorus I. 813: Byzantines are heavily defeated by the Bulgars at Versinikia. 813: China is reunited. c. 813 – c. 915: Period of serious Arab naval raids on shores of Tyrrhenian and Adriatic seas. 814: Charlemagne dies in the city of Aachen. 815: A 30-year peace agreement is signed between Bulgaria and the Byzantine Empire. 820: Muḥammad ibn Mūsā al-Khwārizmī writes his treatise on Algebra The Compendious Book on Calculation by Completion and Balancing. 824: Han Yu dies. 825: Battle of Ellandun: King Egbert of Wessex defeats Mercia and establishes the kingdom of Wessex as the supreme Kingdom in England. 825: Borobudur is completed during the reign of Samaratungga. 827–902: Aghlabids established emirate (province) in Sicily and subsequently raids Southern Italy. 830: The Ghana (Wagadu) Empire is established. 830: The House of Wisdom, a