Little refactor of the message box