Renamed constants to follow a simpler convention.
Fixed a bug that caused day/night swapping to loop each iteration.