Add thread pool and scheduler