Refactored the HBGraph analyzer.