During this time, Dr. Cain suffered from harsh mental degeneration, and required an implant to keep from suffering total brain death. Some time after he got the implant, he contracted the Maverick program himself. He retreated to keep himself from going mad in the public scene while the program began to spread into his organic brain. And it became his doom.
In the aftermath of the Eurasia and Gate incidents, the scientists of the time designed the Cyber-elves to help contain the Maverick outbreak. One such Cyber-elf, the Mother Elf, was used to neutralize the program in all Reploids. Dr. Cain - who now emerged under the name Dr. Weil - took control of the Mother Elf and reprogrammed her, transforming her into the Dark Elf. Dr. Weil used his retained genius to fully repair Zero's old body - the one that was destroyed after the Eurasia incident - and give it a new consciousness, Omega.
^ Hehe, something for the Fanon thread...