Due to previous episodes of court eunuchs amassing power, they were looked upon with suspicion by scholar-officials and Confucian literati. Still, their association with inner palace life and their frequent appointments to high levels of military command provided them with significant prestige. Although military officers with successful careers could gain a considerable amount of prestige, the soldier in Song society was looked upon with a bit of disdain by scholar-officials and cultured people. This is best reflected in a Chinese proverb: "Good iron isn't used for nails; good men aren't used as soldiers." This attitude had several roots. Many people who enrolled themselves as soldiers in the armed forces were rural peasants in debt, many of them former workers of the salt trade who could not pay back their loans and had been reduced to flight. However, the prevailing attitude of gentry towards military servicemen stemmed largely from the knowledge of historical precedent, as military leaders in the late Tang dynasty and the Five Dynasties and Ten Kingdoms (907–960) period amassed more power than the civil officials, in some respects replacing them and the civilian government altogether. Song emperors expanded the civil service examination system and government school system in order to avoid the earlier scenario of domination by military strongmen over the civil order.