Since you asked, I whitetext it. Read at your own peril. Dumbledore asked/forced Snape to kill him. Dumbledore would die anyway from a curse and he didn't want Draco to be a killer. It was decided before the beginning of that school year and Snape was rather reluctant to the idea - which is why Dumbledore had to say "Severus, please" to remind him of his cruel promise.
But as for your question: yeah, I was pleasantly surprised to find out in the last book that he secretly was a better person than he let on. I had definitelly inderestimated him smile