Moved the light config stuff out of the update loop