refactored bzip2 analysis, cleaner more robust