Some compiler optimizations + upgrade to vs2013