add feature flag for colored lights to rendering backend
rearrange backend's code for better readability