Moved the queue handling to the public interface.