removed most mallocs and analyze_bz2 only needs database stuff