Added multi threading support to the server