Cleaning up alert script a bit.