Another big general refactor, change of the data structures and completition of the color loop