The Tsuki No me project was originally thought by the REAL Madara. He realized that this project would take a hell lot of time and he wouldn't live long enough to complete it. Therefore, he came up with a long drawn out plan. After fighting Hashirama and obtaining the Senju DNA, he awakened the rinnegan and created Zetsu. He knew he was about to die but wanted his ideals to "live on". He realized that such a big project would take a long time and someone needed to carry out the project "in his name". Shortly before his death, he (The Real Madara, not Tobi) gave Nagato the rinnegan in hope of being rinne tenseid when his projecet almost neared completion, and passed down all his knowledge and ideals to Zetsu. Madara, convinced Nagato to form the Akatsuki, which was meant to nothing but a tool to be used for Tsuki No me. Years later, Zetsu, during the battle of Kannabi Bridge, got hold of Obito's wrecked body and merged with it. He re-generated Obito's crushed limbs and other parts of his body. With this , Obito INHERITED all of Madara's knowldge from Zetsu and became THE FAKE MADARA, TOBI. Shortly after meeting TOBI , Madara DIED. TOBI'S job was to guide the Akatuki and collect the tailed beasts, and then with Nagato's help revive MADARA. But TOBI changed plans and MADARA ended up being Edo Tenseid.....and all this shit started ..!!!