Fixed a few typos with variables and make the ready queue an actual queue.