Added fields and indexing to models