give him something he likes when he doesn't do it. Then when he does, hold it out and then put it away. congratulate him if he stops. Now he just wants the goods. it's all about discipline and routine of the master, not the mutt. repetition is key. walk with him on the left side of the road, almost demandingly on your left side. NEVER in front of you. Don't let him walk you.
You can prevent him from barking at cars by getting his attention using either a whistle or a clap. Before taking him for a walk, make sure that you make him exercise a lot so that he doesn't have any energy left for barking. Get more tis from http://dogs.about.com/od/dogtraining/qt/barkingdogs.htm.