safe code optimizer