Move resolveType to ModelBuilder
Add index to name prop