Frederick was a proponent of enlightened absolutism, stating that the ruler should be the first servant of the state. He modernized the Prussian bureaucracy and civil service and pursued religious policies throughout his realm that ranged from tolerance to segregation. He reformed the judicial system and made it possible for men not of noble status to become judges and senior bureaucrats. Frederick also encouraged immigrants of various nationalities and faiths to come to Prussia, although he enacted oppressive measures against Polish Catholic subjects in West Prussia. Frederick supported arts and philosophers he favored as well as allowing complete freedom of the press and literature. Frederick was almost certainly homosexual, and his sexuality has been the subject of much study. Frederick is buried at his favorite residence, Sanssouci in Potsdam. Because he died childless, Frederick was succeeded by his nephew Frederick William II.