Tmp files removed from zips, refactoring of library loading