Improve section comments in util.py
Simplify some expressions
Use generator expressions instead of for loops
Remove commit message titles
Reorganize code in analyzer.py