Added an optimizer for the static calls and tests