Generate index

Resolves #1