Salvage a nailed and stained floor

Q: We have clear fir wood floors that we discovered under old shag carpet in our old farmhouse. In some places it is beautiful, but in our living and dining rooms there is glue and paint stains. The worst part of it is they filled the floor with nails (apparently to silence squeaking) before carpeting.

What can we do to salvage this floor and make it look nice again?

A: You can counter sink the nails, which should not be too difficult, and have the floors professionally sanded and finished.