Adding check on the local optimizer
Slight speedup depending on regularization used.
Bug fix
Remove unused code.
Use real inf for local optimization.
Bug fix: The linear data cost can have issues if some costs are inf. Adding test replication the problem without the fix.