God gave Moses the law, all of it. Moses said so. God created all things, so he understood them. Since God gave the law, it is perfectly just, including the death penalty, slavery, polygamy, everything. If a nation wants to set up their laws based on the law of Moses, it is fine with me.
As for the church, we are under a different covenant. Some things in the law were fulfilled and since the gospel has been taken to the gentiles, and we are made clean through the blood of Jesus, laws of separation no longer apply. I take the Bible as a whole, but see it as God's Word, not the words of superstitious men.