He was a bad guy until he was personally affected, then he switched sides and tried to make amends. Ultimately, he died a good guy.