If at times the law of God seems harsh, you should consider that for its time, it was quite advanced. An “eye for an eye and tooth for tooth” was not a commandment of exaction, but a commandment of limitation. If I knocked out one of your teeth, you were only entitled to knock out one of mine – no more. If someone in your family killed someone in mine, only the killer could be put to death. Blood feuds across generations of families were, in the law of God, forbidden.
One should also remember that rehabilitation and deterrence were not goals of the law. Punishment was solely concerned with payment being made for crime, making sure the payment fit the crime, and making sure justice was administered with equity.
Cities of Refuge were safe havens – three on the east of the Jordan and three on the west. A man accused of a capital crime could go there for safety until his trial could be arranged. If he were judged guilty (it was not an accident), he would be put to death. But, if he were judged innocent, he would have to remain in the city of refuge until the death of the High Priest.
It is significant that even the innocent paid a price for the taking of a life, but this showed the serious nature of the action. When it came to life, God’s people were to treat it with the greatest respect.