moves inline index.html code out into js files

Also got rid of the exessive whitespace while I was at it...

so

much

space!