Fixing build errors and added a build.bat