The basilica, which had functioned as a law court or for imperial reception of foreign dignitaries, became the primary public building in the 4th century. Due to the stress on civic finances, cities spent money on walls, maintaining baths and markets at the expense of amphitheaters, temples, libraries, porticoes, gymnasia, concert and lecture halls, theaters and other amenities of public life. In any case as Christianity took over many of these building which were associated with pagan cults were neglected in favor of building churches and donating to the poor. The Christian basilica was copied from the civic structure with variations. The bishop took the chair in the apse reserved in secular structures for the magistrate—or the Emperor himself—as the representative here and now of Christ Pantocrator, the Ruler of All, his characteristic Late Antique icon. These ecclesiastical basilicas (e.g., St. John Lateran and St. Peter's in Rome) were themselves outdone by Justinian's Hagia Sophia, a staggering display of later Roman/Byzantine power and architectural taste, though the building is not architecturally a basilica. In the former Western Roman Empire almost no great buildings were constructed from the 5th century. A most outstanding example is the Basilica of San Vitale in Ravenna constructed circa 530 at a cost of 26,000 gold solidi or 360 Roman pounds of gold.