Add description to index.html
Fix a bug in repair function, add comments etc