The peak of the Byzantine Empire occurred during the Justinian Dynasty. In 527 Justinian I became Emperor. Under Justinian I, the empire gained territory and would reach the peak of its power and wealth. Justinian also established many reforms. One major reform had to do with the law. First, he had all the existing Roman laws reviewed. These laws had been written down over the course of hundreds of years and existed in hundreds of different documents. Then he had the laws rewritten into a single book called the Corpus of Civil Law, or the Justinian Code. Justinian also encouraged the arts including music, drama, and art. He funded many public works projects as well including bridges, roads, aqueducts, and churches. Perhaps his best known project was the Hagia Sophia, a beautiful and massive church built in Constantinople.