<P> As a ruler, Justinian showed great energy . He was known as "the emperor who never sleeps" on account of his work habits . Nevertheless, he seems to have been amiable and easy to approach . Around 525, he married his mistress, Theodora, in Constantinople . She was by profession a courtesan and some twenty years his junior . In earlier times, Justinian could not have married her because of her class, but his uncle, Emperor Justin I, had passed a law allowing intermarriage between social classes . Theodora would become very influential in the politics of the Empire, and later emperors would follow Justinian's precedent in marrying outside the aristocratic class . The marriage caused a scandal, but Theodora would prove to be a shrewd judge of character and Justinian's greatest supporter . Other talented individuals included Tribonian, his legal adviser; Peter the Patrician, the diplomat and longtime head of the palace bureaucracy; Justinian's finance ministers John the Cappadocian and Peter Barsymes, who managed to collect taxes more efficiently than any before, thereby funding Justinian's wars; and finally, his prodigiously talented generals, Belisarius and Narses . </P> <P> Justinian's rule was not universally popular; early in his reign he nearly lost his throne during the Nika riots, and a conspiracy against the emperor's life by dissatisfied businessmen was discovered as late as 562 . Justinian was struck by the plague in the early 540s but recovered . Theodora died in 548 at a relatively young age, possibly of cancer; Justinian outlived her by nearly twenty years . Justinian, who had always had a keen interest in theological matters and actively participated in debates on Christian doctrine, became even more devoted to religion during the later years of his life . When he died on 14 November 565, he left no children, though his wife Theodora had given birth to a stillborn son several years into his reign . He was succeeded by Justin II, who was the son of his sister Vigilantia and married to Sophia, the niece of Empress Theodora . Justinian's body was entombed in a specially built mausoleum in the Church of the Holy Apostles until it was desecrated and robbed during the pillage of the city in 1204 by the Latin States of the Fourth Crusade . </P> <P> Justinian achieved lasting fame through his judicial reforms, particularly through the complete revision of all Roman law, something that had not previously been attempted . The total of Justinian's legislature is known today as the Corpus juris civilis . It consists of the Codex Iustinianus, the Digesta or Pandectae, the Institutiones, and the Novellae . </P> <P> Early in his reign, Justinian appointed the quaestor Tribonian to oversee this task . The first draft of the Codex Iustinianus, a codification of imperial constitutions from the 2nd century onward, was issued on 7 April 529 . (The final version appeared in 534 .) It was followed by the Digesta (or Pandectae), a compilation of older legal texts, in 533, and by the Institutiones, a textbook explaining the principles of law . The Novellae, a collection of new laws issued during Justinian's reign, supplements the Corpus . As opposed to the rest of the corpus, the Novellae appeared in Greek, the common language of the Eastern Empire . </P>

Which of these was the greatest threat to the empire in justinian’s time