Refactored into methods so we don't have to iterate over zipfile names.
Removed some uses of StringIO in favour of reading directly from the zip
file.