Misc fixes
Add mingw build scripts
Misc changes