After the kohanim and the Levites had purified themselves, they purified the people, the gates, and the wall.