Adds some comments. Changes send_message method