Migrate ES5 JavaScript to modern JavaScript
In #407 (closed) we introduce the ability to support modern JavaScript standards but we'll still have the 'old' ES5 JS files in our codebase.
This issue is to migrate the 'old' ES5 JS files to modern JavaScript.