Cleaning up the main.js file, removing unwanted code