This is a first stab, and yes, things are *UGLY*, particularly the
JavaScript, which was written almost 10 years ago. As such, it
pre-dates versions of IE that play nice with web standards, Promises and
lots of other advancements.
My knowledge of JavaScript has also greatly improved since then. :-)