In terms of what we know from the game, the interplanetary transport ship known as the "Eldridge" is the beginning of everything. Legend says it carried the last of humanity, but in reality it carried far more than just a pack of colonists and their belongings. The thousands of people on board lived relatively normal lives in the city at the center of the ship, likely not even aware that the importance of their mission was not based in their search for a new home, but in their cargo - the Deus system, also known as "Yaweh".
Regardless of the Captain's intentions concerning the system, it never reached its destination. While passing by the planet that eventually becomes the home of Fei&Co., the Deus system awakened from its slumber and took control of the ship in an attempt to escape its binding. A little boy named Abel was lost in the confusion of this revolt and came across the Zohar Modifier in his search for his mother, and the Wave Existence - held within the reactor - took advantage of the confusion of its counterpart's break for freedom and created a girl that would function as the maternal figure the little boy wanted so badly. In turn, Deus took advantage of Zohar's creation, and implanted its own program into the girl so she would serve him as well as her original creator; these dual personalities came to be known later as the Mother and the Guardian - Elly and Miang.
To prevent Deus from gaining complete control of the Eldridge (heh, it was a little late for that) and taking it back to their home, the Captain evacuated the ship and destroyed it, effectively cutting off Deus's escape route and destroying everything left inside. Unfortunately (or not, depending on how you look at things), not only did Zohar survive the crash, but so did Deus, the last part of their system (Kadomony), and various remnants of the Eldridge itself. This was the groundwork the system needed to get itself on its feet again; compelled by Deus, Original Elly - now Original Miang with Deus's program active - created the first thirteen human beings on the planet: Providence Cain and the Gazel Ministry. When her task was done she gave birth to Elly and Miang, and died, leaving them to carry on the legacy of their creators.
Miang and Elly
Original Elly is a fabrication of a human - make no mistake of that. She is not the girl in the Captain's locket. Perhaps her appearance was influenced by that girl (surely if she was present on the ship, Abel would have known of her), but 'Elehayym' is completely a creation of Zohar (using Kadomony), with Abel's desire for a mother mixed in for good measure. The Will of the Wave Existence was embedded into this girl; later during the creation process, the seeds for the Miang program were planted by Deus, and the girl became host for two different personas.
'Elly' was in control when the Wave Existence (Zohar) was dominant, but after the crash, Deus's will apparently became stronger, and the Miang Program took over to perform its task and create humanity. Once that task was finished, Original Miang created the two women mentioned above to carry on her task.
The emergence of these two 'descendants' was pivitol to Deus's resurrection plan. They both serve their unique purpose - Elly is there to take care of the Contact and try to whip everyone into shape (Sophia, anyone?), and Miang is there to watch over humanity and ultimately orchestrate her creator's awakening.
To do this, the Miang Factor was inbedded into the DNA of all women on the planet; hereditary and hidden, it cannot be escaped. When Miang's current body dies, that factor will awaken in some other woman, and Miang will come up with it and overpower the vessel's true owner, complete with every memory she has ever formed, and every memory her other vessels have possessed. She states that the body she emerges in is a matter of probobility, but it's possible that near the end she gained some control over it. The game also suggests that she cannot kill herself (which would make sense if you consider her appointed task), but that is yet another technically unconfirmed fact. ^.^
Elly, by nature, is the selfless, loving mother - the human part of the original woman. She is meant to be a caretaker, and she excels at that task (to the point of throwing her life around like a dog's chew toy, as a friend so concisely put it). As the Contact's guardian, she is compelled to take care of him, and this often means that the two fall in love. In every incarnation, her unconditional love and willingness to sacrifice herself has led the Contact and the Anti-type into a viscious, tragic cycle - maybe to motivate the Contact to search for a way to complete himself and achieve his purpose.
Cain and Abel
One other survived the crash of the Eldridge, aside from Elehayym - Abel. He was the sole surviving human, and the other half of the Plan to free Zohar and revive Deus, though he likely wasn't aware of it even after his contact with the Wave Existence. He wandered alone looking for his mother, and found Elly during his most desperate moment. They fell in love and rebelled against the world order that Cain and his "family" were setting up to control the population.
This, of course, ended in disaster for the young couple. Cain and his brothers went after them to squelch the rebellion, and they were aiming to kill. I can only assume Abel was the one in charge (don't even get me started on that), so Cain was obviously gunning to get him, but Elly intervened and sacrificed her own life to save her beloved's. What happened to Abel after this is unknown, but it's likely Cain killed him too, just to be safe. If he didn't, Abel's spirit would have been too broken to foster much in the way of resistence anyway, so we can assume that Cain got his way and held sway over the entire world.
Just to make things interesting... It could be that Cain was envious of Abel, much as he was in the Bible (see the Book of Genesis). There's no indication in the game that he felt anything at all toward them, but I can imagine him seething with hate for Abel and looking at Elly with a slightly... gentler eye. ^^ They all seemed to want Elly for some reason or other. Hmph. Dirty old men.
But more seriously... Abel technically has the "greater favor of God" in this story. It isn't hard to draw the conclusion that Episode Two followed the same pattern the Book of Genesis does.