Count Sergey Ugarov took over as Minister of Education and pursued a more tolerant policy at the expense of excluding the children of the lower classes from universities. Despite this, school attendance and literacy in Russia continued to increase and there began to form a rising middle class that was cosmopolitan in its outlook and connected with European culture and ideas. State censorship barred direct political dissent and the police were prone to harass even writers who did not involve themselves in politics. The great poet Alexander Pushkin was questioned by authorities in 1824 in part because he had befriended certain Decembrists. Eventually, despite some mistrust from the police, Pushkin was allowed to publish his works until he met an untimely end in 1837 after fighting a duel. The writers Mikhail Lermontov and Nikolai Gogol were also viewed with suspicion. Censorship was not totally effective, especially as it varied depending on the personal views of each censor, some of whom tolerated liberal ideas. Philosophical arguments and literary criticism were popular ways of subtly expressing political opinions, and it was during this time that the great debate between "Westernizers" and "Slavophiles" emerged. This debate started in 1836 when Pyotr Chaadayev wrote a philosophical letter in the periodical Teleskop, which declared that: "Standing alone in the world, we have given nothing to the world, we have learned nothing from the world, we have not added a single idea to the mass of human ideas, we have made no contribution to the progress of the human spirit, and everything that has come to us from that spirit, we have disfigured. Today we form a gap in the intellectual order." Nicholas argued that Chaadayev must be insane to make such claims and sentenced him to house imprisonment with periodic visits from a doctor. This embarrassing but fairly mild treatment silenced him. Nicholas appointed the veteran statesman count Speransky to preside over a commission for legal reform. This group in 1832 published the Russian Code of Law. Another of the measures was the reorganization of the State Bank and a general reform of financial matters. This was carried out by finance minister Yegor Kankrin. A secret police, the so-called Third Section, ran a network of spies and informers. The government exercised censorship and other controls over education, publishing, and all manifestations of public life. In 1833, Minister of Education Sergey Uvarov devised a program of