sources should now compile on windows; made some bugfixes; closed some memory leaks;