One of the fundamental changes in Chinese society from the Tang to the Song dynasty was the transformation of the scholarly elite, which included the scholar-officials and all those who held examination degrees or were candidates of the civil service examinations. The Song scholar-officials and examination candidates were better educated, less aristocratic in their habits, and more numerous than in the Tang period. Following the logic of the Confucian philosophical classics, Song scholar-officials viewed themselves as highly moralistic figures whose responsibility was to keep greedy merchants and power-hungry military men in their place. Even if a degree-holding scholar was never appointed to an official government post, he nonetheless felt himself responsible for upholding morality in society, and became an elite member of his community.