Refactor light control to work with new structure