How can Madara still stick around even after the Edo Tensei had been ended? Edo Tensei is a technique to revive the dead, and bind their souls into living bodies. However, after releasing the technique, all of the dead should get back into being dead.

How can Madara still stick around even after the Edo Tensei had been ended? I am not sure if it was something that we needed to think about and figure out by ourselves or is it yet to be revealed?
When Edo Tensei ends, the summoned soul is freed from the Edo Tensei's control, and then the soul ascends to the pure world (afterlife). However, there is a small "grace period" between the two. During this grace period, the soul can act freely. 


   During that grace period, Dan used the Reika no Jutsu to go meet his girlfriend. Itachi shared his memories and feeling with Sasuke (though granted he had been freed from the Edo Tensei's control long back). Most other shinobi stood around doing nothing significant.
 However, during that grace period, Madara released the Edo Tensei's summoning contract itself. As such, his soul is no longer bound to "ascend to the pure world" and can continue to stay in the impure world.


He could have done the same thing even before the Edo Tensei was released, if Kabuto had let him, and the effect would be the same. Also, if others knew the seals and chose to use them, they would be able to stick around too.