Heavily coupled code with a lot of duplication of code. These are the main points of the refactor.
There is some lack of "smart" use of the JS, like the positional arguments instead of objects (for quick fix/change), no separation of concerns, there is something lightly there, but lacks the gross thing.