Link pthread. Fix client and server. Remove any memory leaks. Properly join/terminate threads.