Making the Queue functional.