Updated to VS2012
Fixed some compile issues.