I found some old changes, and cleaned up the code

I once began to actually code the weighted correlation. I only got
around to half-doing that. I found this uncommitted code and committed
it. I also cleaned up the code a bit by aligning it, tabbing it out
properly with my new vim config, and removing trailing spaces. Yeah, I'm
kinda bored.