About the part with god, there's a specific expression for that: God of the gaps. As our (scientific) understanding increases, a proposed god people want to believe in has to lose one characteristic after another because they would not hold up against reason and evidence.