Created lightmeter class to simplify code