He had dedicated significant funds to the construction of great churches, such as Hagia Sophia. As the empire tried to fund the projects, the plague caused tax revenues to decline through the massive number of deaths and the disruption of agriculture and trade. Justinian swiftly enacted new legislation to deal more efficiently with the glut of inheritance suits being brought as a result of victims dying intestate.[28]