I believe your code is decently structured. But I could see your code being a pain to update possibly instead of writing the function inside the event listeners write a pure function then use it as a callback in the event listener where possible
@Iamtrieves
Posted
@ikethedev Thank you