put more of the numerical optimization into the separate module