Updated event creation in the DOM