I changed most
var declarations back to
var only needs to be used for the module members that will be used from outside. I listed the “exported” at the top of the files so that we can see them easily and also for eslint in future. Hopefully, we will be able to use ES6 modules which will simplify it even more. I also replaced
Lang.bind with arrow functions.