Index fields

Fixes #348 
Fixes #341