Prior to his death, David made Solomon to be king over Israel. His confirmation of Solomon, solidified Israel’s leadership for the next generation, in expectation that the values and guidelines of Kingdom would be adhered to.
The next thing David did was to have a count of all the Levites; yet it doesn’t appear as though the Aaronic priesthood was counted, being fewer in number. David appointed four thousand who “praised the Lord with instruments”, made by David with the express purpose of “giving praise.”
There is a chronology of Levites according to one of his sons; either Gershon, Kohath or Merari.
The final order issued by David was to count the Levites who were charged essentially with serving the priesthood. To occupy all those who were in this tribe, the priests gave responsibilities to each of them, as their number increased; yet their responsibilities decreased because they didn’t have the responsibility of carrying the ark any longer as it was now in one location. It is likely that many “traditions” of men were instituted in the early days of their work after the construction of the Temple; as they didn’t have as many responsibilities as when the ark was moved.
We see that David was thoroughly and totally committed to worship and praise to the Lord during his lifetime. What will be written about us when we pass from this life?