Refactor code to use ES6 modules.