Fixed regression in #21 Cleaned up logic of light/extinguish