Merged approx_optimization and optimization