Color Changes, Code refactoring