Close The Concession Stand
Stop making concessions for your dog during training and your structured walk. Stop making excuses for him breaking his commands.
He's gotta pee
He's got an itch
He needed a drink of water
He’s little (stop picking him up)
Oh, he stepped in front of me (so you adjust to his position)
In the absence of real danger to your dog -- it doesn't matter. If you are asking your dog to do a skill that he knows how to do, expect him to do it.
Where you stop, you stop. Don't take 5 extra steps across the sidewalk because your dog wants to sniff the flowers. Don't let him step in front of you if he should be sitting beside you, move him back to the right spot. And certainly don't turn and change directions because he steered you or changed your pace & direction.
Don't let your dog break a command to pee -- if he really has to go release his command and give him a potty break -- but don't let it be a stall or marking tactic.
If you call your dog's name (as a courtesy) to give him a heads up that a command is coming -- and he blows you off -- give the command anyway and follow-through if he doesn't hear you. Snapping your fingers, tapping his head, adjusting your body position in front of him isn't going to help - and just gives him more time not to listen.
Don't let him stall by deciding he needs to scratch -- in the absence of fleas (surely you don't have this issue) or skin issues, when you say heel -- he moves with you and doesn't linger around scratching. When you are ready to go - move. Whether he's scratching or sniffing. If you believe he has a real problem -- deal with it but most often it's manipulation.
If you are taking your dog to a new environment, yes he may be nervous. But your goal is to stick to a very simple command your dog knows to dog how to perform, stick with that and get to done. Relief will come as the reward for doing something you ask him. Of course don't overwhelm him. It might be just a quick walk through the door of the pet store and u-turn your way out -- but that walk should be a good heel.
Use obedience skills, consistent language and can give your dog something he knows how to do and be sure he completes it. Don't let him take the lead by steering you, getting you to adjust to him, or letting him off the hook.
Your leadership matters. Leverage it.