improves content of alert message,
added a close button on settings UI
and refactor the send message code.