cleanup on main.js