Bug fix to the `minimal` helper function. Optimized `more_general` optional heuristic.