Changes to store queue size independently as an O(1) lookup - uses some
memory.