Updated to auto-switch between day and night modes