Added the queue and some other stuff.