Updated scan class with threading and queue.