Fixed a memoryleak, added a script to build for MS windows.