Cleanup main.js file