From the 13th century on the culture of Poland was increasingly affected by forces other than the Church, as the nonecclesiastical institutions begun to gain importance. The 14th century also saw the important transition from the Piast dynasty to the Jagiellonian dynasty. The schools prepared their students for careers not only in priesthood but also in law, diplomacy, and administration. Cracow Academy (centuries later renamed to Jagiellonian University), one of the oldest universities in the world, was founded in 1364. Polish law begun to develop as legal texts recorded laws in secular chancelleries. Polish science also developed, as works of Polish scholars became known abroad. Notable examples of Polish scholarly texts discussed in the Western Europe include a chronicle of popes and emperors by Martinus Polonus and the treatise on optics by Witelo. By the end of the 14th century, over 18,000 students had been educated at the Cracow Academy. The faculties of astronomy, law and theology were staffed with prominent scholars, for example, Stanisław of Skalbmierz, Paweł Włodkowic, Jan of Głogów, and Wojciech of Brudzew. Nicolaus Copernicus (Mikołaj Kopernik) developed new astronomical theories, bringing about a revolutionary change in the contemporary perception of the universe.