Unwanted adverts imbedded in Safari
I'm getting little green icons next to randomly underlined words when I use Safari and and whenever I get close to the underlined word an advertisement pops up. How do I get rid of them? I was trying to download an app (JDownloade-2.dmr??) that allows me to print addresses on envelopes, but I couldn't seem to get it right. Along the way, I seem to have downloaded Chrome, removed JDownloader (I hope), got something called MacKeeper (which I also uninstalled), and now have Yahoo as my Browser - who invited that yahoo to the party?! Whatever have I done and how do I undo it?
iMac, OS X Yosemite (10.10.1)