Added a hashmap for the color codes and changed the functions that use color codes to use the hashmap.