Adds empty queue, sort of fixes the loop bug.

EmptyQueue doesn’t work… yet.

And by “sort of fixes” I mean “fixes, but consequently kind of breaks
other stuff”.