Refactored the cs for alerts in application. Code is much cleaner and faster now