Refactor bundle/compile.js