added more writing to html
made more sensible file structure