Move some static methods into the class that uses them.
Use precomputed expression.