Changing colors. JS refactored (a little bit)