Massive overhaul of coloring algorithms