added zip extraction, some small refactoring, and more minor changes