Added function documentation to index.html