Improved version of Lights.cpp