clean up

main.js cleaned up a little