Refactoring of ColourLogic (part I)