Refactored createIssue so we can easily remove event listener in the future