a little cleanup of main.js