Further cleanup, moving front page js to main.js file