Ranked below the Three Councillors of State were the Nine Ministers, who each headed a specialized ministry. The Minister of Ceremonies was the chief official in charge of religious rites, rituals, prayers and the maintenance of ancestral temples and altars. The Minister of the Household was in charge of the emperor's security within the palace grounds, external imperial parks and wherever the emperor made an outing by chariot. The Minister of the Guards was responsible for securing and patrolling the walls, towers, and gates of the imperial palaces. The Minister Coachman was responsible for the maintenance of imperial stables, horses, carriages and coach-houses for the emperor and his palace attendants, as well as the supply of horses for the armed forces. The Minister of Justice was the chief official in charge of upholding, administering, and interpreting the law. The Minister Herald was the chief official in charge of receiving honored guests at the imperial court, such as nobles and foreign ambassadors. The Minister of the Imperial Clan oversaw the imperial court's interactions with the empire's nobility and extended imperial family, such as granting fiefs and titles. The Minister of Finance was the treasurer for the official bureaucracy and the armed forces who handled tax revenues and set standards for units of measurement. The Minister Steward served the emperor exclusively, providing him with entertainment and amusements, proper food and clothing, medicine and physical care, valuables and equipment.