Bunch of vs2013 compatibility and assorted things