Cleaning up main.js