He cares too much about his crew to be a real villain. He took care of a new guy like Law without even questioning himself once and appears to be trying to understand what happened in the history of Frevance(hence the book he was reading). Even after Law betrayed him, he still had remorse to kill him(and continue to have it).
I don't know exactly why he killed Corazon(or if it was just a mistake on Law's part considering Doflamingo told Law that the reason of his motives are unfounded) but i doubt he did it without remorse or a reason. It's very likely that during this fight the real reason why he killed Corazon(assuming he did) will be revealed because like he said again in this flashback he cares about his brother too much
Doflamingo also has a role to play as an ex-tenryuubito who knows the existence of a certain treasure that could shake this world and think Law's personality switching would have helped, so the possibility of him staying relevant even after his defeat skyrockted
After Law will know the real reason, they won't be enemy anymore(as well as with Luffy). And considering that after losing SAD, Kaido will probably try to kill Doflamingo, it's very likely Doflamingo after his defeat will become an ally and maybe help the alliance to fight Kaido
I don't know exactly why he killed Corazon(or if it was just a mistake on Law's part considering Doflamingo told Law that the reason of his motives are unfounded) but i doubt he did it without remorse or a reason. It's very likely that during this fight the real reason why he killed Corazon(assuming he did) will be revealed because like he said again in this flashback he cares about his brother too much
Doflamingo also has a role to play as an ex-tenryuubito who knows the existence of a certain treasure that could shake this world and think Law's personality switching would have helped, so the possibility of him staying relevant even after his defeat skyrockted
After Law will know the real reason, they won't be enemy anymore(as well as with Luffy). And considering that after losing SAD, Kaido will probably try to kill Doflamingo, it's very likely Doflamingo after his defeat will become an ally and maybe help the alliance to fight Kaido