moved headline in index.htm instead of main.js
Added comments, and made code more readable