You Didn't Know Galileo...
Just how old are you that the church "lost" you when Galileo was put under house arrest? Also, you might want to reconsider why Galileo was put under house arrest...not because he was right, but because he couldn't prove it. He was given the opportunity to explain his proof, but utterly failed to do so, because Galileo didn't have the maths to prove his version was incontrovertible. However, he WAS an arrogant fool who believed he could go about teaching whatever he wanted. It was for his insistence on teaching what he couldn't prove that Galileo was put under house arrest.
Next, I would argue every institution and every nation has it's share of scofflaws, murderers, lunatic leaders, and insanity. That is the nature of man. And, unfortunately, the Church on Earth is also run by man, who sometimes errs, commits greivous crimes, etc. Yet, the Church continues to stand and thrive for good people do step up and work hard to rid the Church of such evil that plagues the rest of mankind. It's a never-ending fight and one that will continue until the Second Coming (whenever that is). So, don't blame God for the work men do. Going further, you might as well give up on everything ever attempted anywhere at anytime by man--science, literature, government, art, industry, family, the internet, The Reg, etc just because someone, somewhere did something bad in each of man's endeavours.
I suspect, if you count, many more wars have been fought over territory, title, power, etc, than over religion.
As for the ""Thou Shalt Not Kill" thingie"--it's actually "murder", as in illegally taking a life.