refactor zip archiver for memory leaks