There are four main organizations in the Underworld Palace, namely the Underworld's Bureau of Laws, Department of Rewarding Good, Department of Evil Punishment and the Inquisition Agency.
Lord Cui is the chief judge of the Underworld's Bureau of Laws.
The head judge of the Department of Rewarding Good is Wei Zheng.
The chief judge of the Department of Evil Punishment is Zhong Kui while the chief judge of the Inquisition Agency is Lu Zhidao!
These four institutions not only consist of their respective chief judges but also many other judges who assist with the work. These judges are classified as "Civil and Military Judges". Civil judges, as exemplified by Lord Cui, can use the power of the Book of Life and Death and the judge's pen to judge Yin spirits and determine their three lives.