As David's reign proceeded and his power increased, he organized a more elaborate system of government than had existed before his time, selecting a "cabinet" to aid him in his administration of Israel's affairs (see II Sam. 8:16-18).
Joab, who had already proved himself to be a skillful general, was placed in charge of military affairs, while Benaiah was appointed as captain of the royal guard. A certain Jehoshaphat was chosen as "recorder," which may well imply that he acted as official historiographer. Religious affairs were in no way neglected, for Zadok and Ahimelech are listed as "the priests." Other officials included Ahithophel,, "David's counsellor," and "Hushai, David's friend" (15:12, 37), presumably confidential advisers to the king.
Assured of the Lord's protection and support, David made every effort to execute "judgment and justice unto all his people" (8:15). In planning for the future development and continuity of his kingdom, he appointed his sons as "chief rulers" (verse 18).