It's amazing what relief you feel when you shift your mindset from codependency to independency. I'm glad to hear that you're doing better a little further away from your friend.
I can recognize that I'll go out of my way to help such people through their endless problems despite the fact that there's never any improvement. New problems always crop up and previous lessons go unlearned. It's hard for me to turn my back to someone I've helped so much, but I have to look and see that nothing will change.