updated to vs2012, with some minor tweaks to reduce build warnings