My two year old is like a sponge with a photographic memory--she absorbs everything she sees the first time. Correcting bad behaviors is definitely harder than learning them. For us, consistency is key...the same correction over and over again.
I am not opposed to spanking as a rule, but don't think that a two year old has the cognition to understand why they are being spanked (unless you are doing it over and over again). For me, eating boogers doesn't warrant repeated spankings.
Keeping calm and making as little as a deal as possible can help with the booger eating. I just tell her that she needs to use a tissue to pick her nose, "yuck!", and that it goes in the trash.
Reteaching bad words is another story. I inadvertantly taught her to yell "shut up" at the dogs. I haven't managed to make a full correction, but she does only yell it at the dogs. I try to be consistent in giving her another word to use.
Good Luck!