19th-century philosophy of complexity from mathematics, astronomy, physics, chemistry, biology, and a new discipline called "sociology", which is the study of the "dynamics and statics of society". The American philosophers Charles Sanders Peirce and William James developed the pragmatist philosophy in the late 19th century. The twilight years of the 19th century in Britain saw the rise of British idealism, a revival of interest in the works of Kant and Hegel. Transcendentalism was rooted in Immanuel Kant's transcendence and German idealism, led by Ralph Waldo Emerson and Henry David Thoreau. The main belief was in an ideal spiritual state that 'transcends' the
Scottish religion in the nineteenth century to the rapid expansion of temperance societies and other religious organisations such as the Orange Order and Freemasonry. There were also missions at home to the Highlands and Islands and expanding urban centres and abroad, particularly to Africa, following the example of David Livingstone, who became a national icon. The rapid population expansion in the late eighteenth century and early nineteenth century, particularly in the major urban centres, overtook the system of parishes on which the established church depended, leaving large numbers of "unchurched" workers, who were estranged from organised religion. The Kirk began to concern itself with providing churches