A little more refactoring in the AlertLayer class