fixed ajax call interval, and changed default case colors to black
refactored JavaScript, separating light and temp updates to their own functions