Added task pool functionality, refactored server connection pool