cleanup mainPage.js