Reformat long line
Start to add logic for staff alerts, but not complete