Tweaks to indexing and database table fields

Tweaks to indexing and database table fields.