Added indices to associations.
Removed specified names of indices.
Moved object lookups away from views.
Reimplemented references using one table instead of one per reference type.