changed main.js into a script included separately