Added thread pool class.