Since it says in the Torah that a Cohen is prohibited from being around dead people, then how come Pinchas who was a Cohen was permitted to kill Zimri and Cozbi.
"And the LORD said unto Moses, Speak unto the priests the sons of Aaron, and say unto them, There shall none be defiled for the dead among his people":
"And behold, one of the people of Israel came and brought a Mid'ianite woman to his family, in the sight of Moses and in the sight of the whole congregation of the people of Israel, while they were weeping at the door of the tent of meeting. When Phin'ehas the son of Elea'zar, son of Aaron the priest, saw it, he rose and left the congregation, and took a spear in his hand and went after the man of Israel into the inner room, and pierced both of them, the man of Israel and the woman, through her body. Thus the plague was stayed from the people of Israel. Nevertheless those that died by the plague were twenty-four thousand."