Did lots of work to make lights save their state a bit