Changed to thread pool architecture