To my past self's defense, I was fully aware back then that the code was a horrible mess, I simply hadn't a clue how to do it well without using bloated frameworks that would have long been out of fashion by now. But nowadays we have much better options, such as Elm.
@ayo How does the saying go? Hindsight is 20/20
We are a cute and loving international community Ｏ(≧▽≦)Ｏ !