Add threading for multiple simultaneous connections