Checking for division by 0
Scaled down number of lights and resolution for mobile