Best unlocked smartphone under $500?

The title says it all. I'm looking for an unlocked smartphone under $500.

The only rule is that it must work on T-Mobile USA.