That is pretty much where every frontend dev starts out and then quickly realizes that as your codebase grows and you have different types of data and events firing back and forth, things get unwieldy fast. I'm sure you think your 4k lines of functions across however many files works for you, but I think if you really take the time to learn one of the good JS frameworks, you will be amazed on how much cleaner and robust your code will become.