Add pooled thread
Refactoring Server and client