Moved light functionality to separate class