Refactor fields for index to support nesting
Better handle nulls in index requests
Tidy index tests