port most of the stuff to VC++ 2013 again