minor changes not affecting functionality: removed a comment, renamed a variable in example
Add 1s sleep test before refreshing index after submitting event that triggers an alert