[fix] syntax errors and formatting in main.js