of Westphalia of 1648. Further restrictions however soon followed. The "Arian registry", established after the sect's exodus, included in reality a variety of cases under religious persecution and prosecution, such atheism or apostasy, official separation from the Church. Apostasy was banned in 1668. From 1673 only Catholics could be granted nobility or indygenat, a recognition (transfer) of foreign nobility status. In 1717, after the Northern War destruction, Protestants were not allowed to restore the structures of their congregations or build new ones. They were banned from holding state offices and removed from central parliament. The discriminatory laws were all collected in the sejm statute of 1733, after which the Commonwealth Protestants no longer enjoyed meaningful political rights. Actual cases of religion-inspired violence, such as the Thorn Tumult of 1724, were rare and considerable freedom of religious practice had prevailed. Non-nobles attracted less scrutiny and many foreign persecuted minorities were allowed to settle in the country and keep their religion. The Orthodox Church hierarchy in the Commonwealth were all forced to accept the Union in the early 18th century. The much-reduced Protestants remained significant. They cooperated among the several denominations and appealed to the Treaty of Oliva guarantees or to foreign (Prussian, English and Dutch) protection in case of imposed restrictions. The ethnically Polish and culturally active settlement concentrations that had remained in parts of Silesia, Pomerania and Prussia had the burgher Protestant class as their leading component. Culture of Mature Baroque The predominance of Sarmatism and Counter-Reformation and the weak cultural development of the Commonwealth were closely related to the lowered, in comparison with the previous period, level of general education. What was left of the school system, destroyed or damaged by wars and lack of interest, concentrated on religious education and cultivating the attachment to szlachta's "freedoms". The number of parish schools and secondary schools increased in the 18th century, with more serious reform commencing in the 1840s. Many secondary education colleges were conducted by religious orders of the Jesuits and Piarists. In the early 18th century the illiteracy levels may have ranged from about 28% of upper nobility, to 92% of petty nobility, with over 40% for middle nobility and burghers. Protestant middle schools fared somewhat better, led by the well regarded gymnasiums in Danzig and Thorn. There were accomplished Polish Protestant schools in Silesia, led by the Pietist school in Teschen and the municipal school in Breslau.