moved JavaScript into it's own folder and file