Refactor message box code, noticeably reducing the g3a file size.