message_sent template and some enhancements