Dan this discussion was not actually aimed towards moral values althought these are in question and important, but more towards the ambivalence of God's behavior.Of course what God did is ok within his defined morality, I am not sure whose standard you are holding him too but if it is your own then well
You are saying thet God knows exactly what he is doing and that we should follow his commands as blind people. I don't agree with such behavior.
More than that, if you analyze human behavior, you will notice that God's commands have nothing divine, but more like human written all over it.
There are more logical explanations for those commands rather than "God knows what he is doing and God is passing judgement". You choose to have blind faith in God. I choose to trust my own judgement.