Montgelas enforced the taxation of the nobility and the clergy. Taxation went along with a complete economic description and measurement of Bavaria leading to an outstanding cadastral system. Montgelas passed the first modern constitution for Bavaria in 1808, which included the abolition of any relics of serfdom that had survived until then. Montgelas was responsible for the abolition of the torture in 1812 by introducing a new penal code based on contemporary humanitarian standards. He introduced compulsory school education, compulsory military service, compulsory vaccination. He reorganised the Bavarian administration by a centralised cabinet of modern ministries instead of a multitude of chambers. Montgelas was also responsible for the abolition of all tolls within the kingdom of Bavaria thus enabling free trade within the country. And he designed and passed a regulation for civil servants, the "Dienstpragmatik", which became a model for civil service in Germany as whole. According to its rules, admission to any service within the public administration was no longer dependent on whether one was Catholic or of noble family, but solely on the quality of one's education. Thus Montgelas broke the preponderance of the nobility in the higher and decisive ranks of public administration. Civil servants were granted a sufficient salary and their widows a pension. Thus Montgelas refounded the civil service on new ethics and created a social group of servants loyal only to the crown and kingdom of Bavaria.