Cleaned main.js file