Can now clear properties when an index doc is deleted, plus better unit tests