Generating HTML tree through JS, which closes #13.