Moved alerts declaration to its local method as it is not used elsewhere as of yet.
refactored the name of FlashModes to FlashConstants for future maintainability.