Add model parsing and filtering

Also add some temporary code to the index so I can mess around with it.
Tests forthcoming, possibly after I move more of the filtering logic out
of the collection and into the model.