Added triangle improvement heuristics.