A couple of programs I use that may or may not help:
CleanMyMac 2: Clean Up Your Mac with Best Mac Cleaner. Clean My Mac 2
runs a scan of your mac and cleans up clutter
antivirus for mac:
http://www.avg.com/us-en/avg-antivirus-for-mac
AVG has a free version that i have. It recently found and fixed a problem on my iMac.
One more thing to try:
click and hold the command key, the option key, and the escape key. This will bring up a "force quit applications" window, and it will tell you if an application is not responding. I use this all the time when I get the spinning wheel when using my firefox browser (I force quit the browser then restart it)