take out non-HF specific code and move it to index.html (demo)