Refactored multiple occurrences of showing aMessageBox