Moved instantiation of queue object into the constructor.