Refactor make.js.