Now we moved light into a function for easier profiling.