Physics (Wuheng), four on Geography (Dili), three on Hierarchy of Office (Zhiguan), one on Carriages and Costume (Yufu), two on Sutras and Books (Jingji), two on Commodities (Chihuo) and finally one single chapter on Punishment and Law, in that order. The Confucian Code of Rites (Liji), not law, is expected to be the controlling document on civilised behaviour. In the Confucian world view, rule of law is applied only to those who have fallen beyond the bounds of civilised behaviour. Civilised people are expected to observe proper rites. Only social outcasts are expected to have their actions controlled by law. Thus the rule of law is considered a state of barbaric primitiveness, prior to achieving the civilised state of voluntary observation of proper rites. What is legal is not necessarily moral or just. Under the supervision of Tang Confucian minister Fang Xuanling, 500 sections of ancient laws were compiled into 12 volumes in the Tang Code, titled: Vol 1: Terms and Examples (Mingli) Vol 2: Security and Forbiddance (Weijin) Vol 3: Office and Hierarchy (Zhizhi) Vol 4: Domestic Matters and Marriage (Huhun) Vol 5: Stables and Storage (Jiuku) Vol 6: Impeachment and Promotion (Shanxing) Vol 7: Thievery and Robbery (Zeidao) Vol 8: Contest and Litigation (Dousong) Vol 9: Deceit and Falsehood (Zhawei) Vol 10: Miscellaneous Regulation (Zalu) Vol 11: Arrest and Escape (Buwang) Vol 12: Judgment and Imprisonment (Duanyu) The Tang Code lists the five forms of corporal punishment for serfs as: Flogging () Caning () Imprisonment () Exile () Death () Leniency is applied according to the Eight Deliberations: Blood relation Motive for the crime Virtue of the culprit Ability of the culprit Past merits Nobility status Friendship Diligent character Confucianism in its revised form (Neo-Confucianism) continued to be the state orthodoxy under the Song, Ming and Qing dynasties. This ensured that the Confucian foundations of the Tang code were retained, and in some respects they were even strengthened. By the time of the Qing dynasty however, the mass of legislation had increased to such an extent that it was doubtful whether even officials could adequately master the complex distinctions it came to contain. Varieties of law Traditional Chinese law can be divided into the "official" law and "unofficial law". The "official law" emanates from the authority of the emperor. The doctrine of separation of powers was unknown in China until the 20th century. In particular, judicial and administrative