Refactored constant folding and arithmetic optimizations
Merge remote-tracking branch 'origin/tests-optimization' into
tests-optimization