Add tres to indexing, fix tests