It was a good end for Madara. Seeing as he didn't fall into Naruto's TNJ made his character for the better. He realised painfully that his dream won't come true and he was proven wrong. In the end he acknowledged Hashirama's dream of the village and the next ten continuing on. It was a good end for him.