Added operation folding optimization