Added additional logic for light behavior.