Minor changes to avoid innecessary loops
Merge pull request #20 from alfred82santa/feature/light_optimisation

Minor changes to avoid innecessary loops