generate index, cleanup dangling symlinks