FromtheQinDynastytothelateQingDynasty,theChinesegovernmentdividedChinesepeopleintofourclasses:landlord,peasant,craftsmanandmerchant.Landlordsandpeasantsconstitutedthetwomajorclasses,whilemerchantsandcraftsmenwerecollectedintothetwominorones.Theoretically,exceptforthepositionoftheEmperor,nothingwashereditary.Therewasapartialrestorationoffeudalismwheneminentfamilieswithlargeamountsoflandandhugenumberofsemi-serfsemerged.Thesefamiliesdominatedimportantcivilianandmilitarypositionsofthegovernment,makingthepositionsavailabletomembersoftheirownfamiliesandclans.SincetheTangdynasty,thegovernmentreformedtheimperialexaminationsystemasanattempttorootoutthisphenomenon.