Napoleon was certainly a despot. He capitalized on his military successes to rise to power via a military coup, in the process subverting the French constitution. Once in power, he ruled as first a dictator, then an emperor. Yet Napoleon, very much an admirer of the intellectual tradition of the Enlightenment, also instituted a number of reforms that institutionalized many of the advances made in the French Revolution. He established a civil administration system that was almost unprecedented in Europe in that it was essentially a meritocracy. He developed public schools. Most importantly, he developed the Code Napoleon, a reformed legal code that eliminated many of the old, anachronistic legal protections for nobles. He also carried many of these liberal reforms to conquered territories, particularly in Germany. Yet Napoleon also rolled back reforms for women, reinstituted the Catholic Church as the state church of France, and cultivated a cult of personality in France that played on exactly the quasi-democratic reforms that he instituted.