Optimizer: common denominator optimization impl - #9