Refactor a bit stuff of queue storage