I bet most of that $500 was labor. And / or overpriced brand name parts. If $500 seems like a lot, I would study up on how to do more of your own work.
But hey, you have something reliable to get around on, something you know fits you and you're used to, and is now mechanically-sound. What's not to like about that?
I can safely say that any bike part that I have personally worn out from riding many miles on, I got my money's worth out of it.