I can't find the exact cite, but I am quite sure that the Bloody Mist graduation ritual was created by Yagura while under the control of a shadow figure with Madara's hairstyle, a man we've all been calling Tobi, but was likely Madara himself. We know that Tobi has had to distinct hairstyles at various times, one resembling Madara's, and one shorter. Now that we know the shorter one to be Obito's, how can we not presume the longer one certainly to be Madara's?
As for Yagura's manipulation, I'd blame chakra rods in Yagura's corpse, but I don't see any rods on his body or Madara's sharingan eyes when he reveals himself to Kisame.