Move Constants optimization to submodule