Social life during the Song was vibrant. Citizens gathered to view and trade precious artworks, the populace intermingled at public festivals and private clubs, and cities had lively entertainment quarters. The spread of literature and knowledge was enhanced by the rapid expansion of woodblock printing and the 11th-century invention of movable-type printing. Technology, science, philosophy, mathematics, and engineering flourished over the course of the Song. Philosophers such as Cheng Yi and Zhu Xi reinvigorated Confucianism with new commentary, infused with Buddhist ideals, and emphasized a new organization of classic texts that brought out the core doctrine of Neo-Confucianism. Although the institution of the civil service examinations had existed since the Sui dynasty, it became much more prominent in the Song period. The officials who gained power by succeeding in the imperial examination became a leading factor in the shift from a military-aristocratic elite to a scholar-bureaucratic elite.