Slight refactor and getting the event handler in check.