I've done two ways... one is sort of flanking the dog whenever he goes to sit crooked (before his butt even hits the ground). I had a GSD that was really exaggerated in his crooked sit, so I started flaking him to pull him in. He got sick of that real quick and just started fixing it himself. I wouldn't do this with an overly soft dog, young dog, or extremely hard dog who'll bite you. But for him, he was kind of an average joe,happy go lucky and it only took 3-4 times before he got it.
The other way was heeling along side a wall which works great in all until you run out of wall. At a seminar I was at, the guy said to use a chair. You can use it with you anywhere on the field. Set up several chairs so you build the habit and then start weaning off the chair to something smaller (chute ... board, etc).
Food is also a good manipulator but I find this most effective if your teaching the foundation of the heeling, to just teach a correct, straight sit as part of heeling. If I have a dog that I'm able to teach heeling with food, I just make sure when I'm going to stop, I manipulate my hand (the dog's head) so that his butt goes straight every time. Works great if you have a dog thats really into the food. From my clients over the last, eh, 8 months, I've had 2 dogs that this worked for. The rest didn't have enough food drive and manipulating the food made them loose interest.
As far as crooked sits where their leaning or their legs are sloppy, on the Anne Silverton tape (gosh that doesn't sound like the right name.... Competitive AKC Novice, Open, Utility from the CTS) .... she actually fixes her dogs legs by physically placing the legs. She does this on sit stays or if the dog is sitting by her side. If I remember correctly she uses a cue word and then eventually teaches them to square themselves up.