Added class to create a new thread for sending messages