Fixed doubleWithUncertainties for practical use, updated runCutOptimizer to use it.