Several heuristics have been added.