refactor sdk initialization snippets for index.html to separate files