Reordered the functions and added prototypes to the header file.
Clear all dots of that color when a cycle is completed.