Tag index

Just starting on this, not for merging yet, but feedback welcome.
on the off chance that we allow them to change the database name in the future