Don't import * from utils
Improve section comments in util.py
Simplify some expressions
Use generator expressions instead of for loops