devided index.html to main.css and main.js

handler resource loading