Monstrous refactoring of JavaScript code.