Also, the logic below this line is too convoluted. I think it works, but it is too hard to understand and maintain.

It would be much simpler if you just did this here:

```
// If nothing has changed since last time we checked, then we're done.
if (previous && previous === status.value) {
  return;
}
```
That will make the code below much simpler.