Added threadpool to manage connections