corrected version of generate_index
Version on website.
Merge branch 'populate' into gh-pages