[fix] slightly cleaned up main.js