Added debug mode build, fixed a few W64 warnings and some cosmetic.