Add Optimization class and wire in constant folding