He didn't so much transfer his powers as he gave Sasuke his MS as he was dying. And we already know that the MS's power can be transferred between Uchihas.
We don't know how Itachi turned out to be good, the last page of the latest chapter had Madara about to explain Itachi's motivations to Sasuke, and he described him as "risking it all to protect the entire ninja-world" or something. >>10981641
I, personally, think Tobi will turn out to be Madara in Tobi's body or something. Just like he worked so hard never to reveal the Forth's name before revealing he was Naruto's father, Kishimoto is trying too hard not to show us the left side of Madara's face, his left eye specifically. Plus, apparently in this year's Naruto, Kakashi is going to get a lot of focus as a character, and he's seen that Tobi is a sharingan user.