Added threads for listening and sending messages