im not reading though everything so this may have been said, but maybe madrara took izuna eyes and then he died (im not including and tobi idea theory crapola here so dont be like "izuna didnt die cause hes tobi). after which madrara had his fight with the first, after some time the first died and maybe madrara made a reapperance. then the second made the edo tensei to bring the frist back ?(cause he is the only one who can beat him). but its proven that he never finished making it. then maybe madrara got beat again by first or knew there was no way he could win and ran. madrara prolly copied what he could of it with his ems and finished it, also finding out about how to break the contract. a reason why he would do that? like he said, he will never be controlled by such a jutsu. he finished the edo tensei before oro because he knew he would be brought back to life one day.