Made light control code consistent