That last part came out organically as I was writing the story. I kept thinking, who do I want to have the protagonist end up with? And then I was about halfway and it struck me.
It worked! :)