Some clean up in main.js