Disabled optimization for debugging

Set the default compiler options to "-g" and removed "-O2" from
automakes default behaviour
Fixed a bug with selfoverriding better solutions