A few modifications to the message struct and defining function for thread for the server