The Mazda3 Diesel is supposed to be a nice car (I think they have it in the 6 as well?) Bit more economical to run.
In your $40k range, a VW Diesel, or Skoda, would be good on the fuel, and comfortable if you can get one to fit budget.
I was only (half) joking about the Mazda3 MPS - I know they aren't sold new anymore, and they are manual, but man they are fun to drive. Zoom Zoom. :)