Move coloring-related routines to different files