Made some changes so it compiles on Visual Studio again