Finishes implementation of queue