More fixes to get the index to work
Fixing up testcases which now need an entity manager