cleanup + sanity checks
vs2012 compatibility update