There's very little you can do about sets, but it looks like you've got an instinct for what little you can do. Just solidify your notions and make them into hard rules that you follow strictly. Ideas on what these might look like:

-If you've ONLY got TPTK, be more willing to laydown, as big bets/raises could just as easily be 2pair. This applies even if there aren't straights or flushes possible. Applies doubly if any ace is onboard, because of the Ax crowd.
-If you've got two pair, especially top two pair, it's much harder. An AK two pair is going to the river every time, sorry. Don't forget there are more As and Ks in the deck, so you could over-boat the guy. That's nice. I did that the other day.
-At the river, a gigantic reraise of your big bet on top two pair requires careful thought. Most of the weak-passives you find at low limits are not capable of doing this without a set or better. Then again, some weak players do this with a TPTK when none of the draws pan out.
-Did opp quickly call an affordable PF raise? Then hesitate to call with medium or big cards on the flop? Then "wake up" suddenly when a seemingly-unrelated card appeared? All food for careful thought.