My macbook has been gradually getting hotter and running slower. Recently it started displaying some weird behavior that I assumed was a failing HD since it's 5 years old. I ran the extended Apple Hardware Test (more than once for confirmation) and got the following error: 4SNS/1/40000000: TN1D-104.000. Googling suggested that the CPU's northbridge was reaching a temperature of 104 deg. C and that macbooks have issues with overheating that can be attributed to poor application of thermal paste.
I followed this guide. The fan, heatsink fins and the underside of the logic board were almost completely clogged with dirt and cat hair. Got rid of it that, cleaned the excessive globs of dried up thermal paste, reapplied thermal paste and put everything back together. The macbook is now running cooler and faster and video is running quite smoothly which was an issue previously. I reran the Apple Hardware Test which reported, "No trouble found".