Fixed a bunch of memory leaks (47 down to 14 (8 of which are caused by external Zip library))