made some improvements to the day/night refresh scheduling