Added visual studio project file
Fixed code for Windows build