Implement send-message, add main method for debugging