Minor changes to server; pass thread id as parameter and some commenting