Ran code analysis.

Ran code analysis in VS2012 and fixed/silenced everything it found.