Moved js generation into IndexHtml class