Improves the handling of `main.js`