Refactor to get lighting devices loaded properly.