Added different renderings for the light according to modes.
Fixed mode switching.