More schema cleanup.

Removing unused tables and columns and adding indexes.