Added compatibility with Visual Studio 2012

Removed all errors/warning from visual studio  (warnings removed using
pragma lol)